From ee8fac6ff1b9568dede983a25858961b62722c6d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Apr 2022 06:05:24 +0000 Subject: [PATCH 001/126] Auto-generated commit ac58ed7d6e0ad3dcd479be89897ad8f893d712b3 --- CONTRIBUTORS | 28 + LICENSE | 481 +++++++++ NOTICE | 1 + README.md | 265 +++++ index.d.ts | 1580 +++++++++++++++++++++++++++++ index.mjs | 4 + index.mjs.map | 1 + package.json | 30 + stats.html | 2689 +++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 5079 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..4626771 --- /dev/null +++ b/README.md @@ -0,0 +1,265 @@ + + +# Async + +[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] + +> Async utilities. + + + +
+ +## Usage + +```javascript +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@esm/index.mjs'; +``` + +#### ns + +Namespace containing async utilities. + +```javascript +var o = ns; +// returns {...} +``` + + + +
+ +- [`anyByRightAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/any-by-right]: test whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. +- [`anyByAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/any-by]: test whether at least one element in a collection passes a test implemented by a predicate function. +- [`bifurcateByAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/bifurcate-by]: split values into two groups according to a predicate function. +- [`composeAsync( ...fcn )`][@stdlib/utils/async/compose]: function composition. +- [`countByAsync( collection, [options,] indicator, done )`][@stdlib/utils/async/count-by]: group values according to an indicator function and return group counts. +- [`doUntilAsync( fcn, predicate, done[, thisArg ] )`][@stdlib/utils/async/do-until]: invoke a function until a test condition is true. +- [`doWhileAsync( fcn, predicate, done[, thisArg ] )`][@stdlib/utils/async/do-while]: invoke a function while a test condition is true. +- [`everyByRightAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/every-by-right]: test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. +- [`everyByAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/every-by]: test whether all elements in a collection pass a test implemented by a predicate function. +- [`forEachRightAsync( collection, [options,] fcn, done )`][@stdlib/utils/async/for-each-right]: invoke a function once for each element in a collection, iterating from right to left. +- [`forEachAsync( collection, [options,] fcn, done )`][@stdlib/utils/async/for-each]: invoke a function once for each element in a collection. +- [`functionSequenceAsync( ...fcn )`][@stdlib/utils/async/function-sequence]: function sequence. +- [`groupByAsync( collection, [options,] indicator, done )`][@stdlib/utils/async/group-by]: group values according to an indicator function. +- [`ifelseAsync( predicate, x, y, done )`][@stdlib/utils/async/if-else]: if a predicate function returns a truthy value, return `x`; otherwise, return `y`. +- [`ifthenAsync( predicate, x, y, done )`][@stdlib/utils/async/if-then]: if a predicate function returns a truthy value, invoke `x`; otherwise, invoke `y`. +- [`inmapRightAsync( collection, [options,] fcn, done )`][@stdlib/utils/async/inmap-right]: invoke a function for each element in a collection and update the collection in-place, iterating from right to left. +- [`inmapAsync( collection, [options,] fcn, done )`][@stdlib/utils/async/inmap]: invoke a function for each element in a collection and update the collection in-place. +- [`mapFunAsync( fcn, n, [options,] done )`][@stdlib/utils/async/map-function]: invoke a function `n` times and return an array of accumulated function return values. +- [`mapKeysAsync( obj, [options,] transform, done )`][@stdlib/utils/async/map-keys]: map keys from one object to a new object having the same values. +- [`mapValuesAsync( obj, [options,] transform, done )`][@stdlib/utils/async/map-values]: map values from one object to a new object having the same keys. +- [`noneByRightAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/none-by-right]: test whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. +- [`noneByAsync( collection, [options,] predicate, done )`][@stdlib/utils/async/none-by]: test whether all elements in a collection fail a test implemented by a predicate function. +- [`reduceRightAsync( collection, initial, [options,] reducer, done )`][@stdlib/utils/async/reduce-right]: apply a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. +- [`reduceAsync( collection, initial, [options,] reducer, done )`][@stdlib/utils/async/reduce]: apply a function against an accumulator and each element in a collection and return the accumulated result. +- [`waterfall( fcns, clbk[, thisArg] )`][@stdlib/utils/async/series-waterfall]: execute functions in series, passing the results of one function as arguments to the next function. +- [`someByRightAsync( collection, n, [options,] predicate, done )`][@stdlib/utils/async/some-by-right]: test whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. +- [`someByAsync( collection, n, [options,] predicate, done )`][@stdlib/utils/async/some-by]: test whether a collection contains at least `n` elements which pass a test implemented by a predicate function. +- [`tabulateByAsync( collection, [options,] indicator, done )`][@stdlib/utils/async/tabulate-by]: generate a frequency table according to an indicator function. +- [`trycatchAsync( x, y, done )`][@stdlib/utils/async/try-catch]: if a function does not return an error, invoke a callback with the function result; otherwise, invoke a callback with a value `y`. +- [`trythenAsync( x, y, done )`][@stdlib/utils/async/try-then]: if a function does not return an error, invoke a callback with the function result; otherwise, invoke a second function. +- [`untilAsync( predicate, fcn, done[, thisArg ] )`][@stdlib/utils/async/until]: invoke a function until a test condition is true. +- [`whileAsync( predicate, fcn, done[, thisArg ] )`][@stdlib/utils/async/while]: invoke a function while a test condition is true. + +
+ + + +
+ + + +
+ +## 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..cd10c2a --- /dev/null +++ b/index.d.ts @@ -0,0 +1,1580 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2021 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); +import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); +import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); +import composeAsync = require( '@stdlib/utils-async-compose' ); +import countByAsync = require( '@stdlib/utils-async-count-by' ); +import doUntilAsync = require( '@stdlib/utils-async-do-until' ); +import doWhileAsync = require( '@stdlib/utils-async-do-while' ); +import everyByAsync = require( '@stdlib/utils-async-every-by' ); +import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); +import forEachAsync = require( '@stdlib/utils-async-for-each' ); +import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); +import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); +import groupByAsync = require( '@stdlib/utils-async-group-by' ); +import ifelseAsync = require( '@stdlib/utils-async-if-else' ); +import ifthenAsync = require( '@stdlib/utils-async-if-then' ); +import inmapAsync = require( '@stdlib/utils-async-inmap' ); +import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); +import mapFunAsync = require( '@stdlib/utils-async-map-function' ); +import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); +import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); +import noneByAsync = require( '@stdlib/utils-async-none-by' ); +import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); +import reduceAsync = require( '@stdlib/utils-async-reduce' ); +import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); +import waterfall = require( '@stdlib/utils-async-series-waterfall' ); +import someByAsync = require( '@stdlib/utils-async-some-by' ); +import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); +import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); +import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); +import trythenAsync = require( '@stdlib/utils-async-try-then' ); +import untilAsync = require( '@stdlib/utils-async-until' ); +import whileAsync = require( '@stdlib/utils-async-while' ); + +/** +* Interface describing the `async` namespace. +*/ +interface Namespace { + /** + * Tests whether at least one element in a collection passes a test implemented by a predicate function. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Successfully read at least one file.' ); + * } else { + * console.log( 'Unable to read any files.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.anyByAsync( files, predicate, done ); + */ + anyByAsync: typeof anyByAsync; + + /** + * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Successfully read at least one file.' ); + * } else { + * console.log( 'Unable to read any files.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.anyByRightAsync( files, predicate, done ); + */ + anyByRightAsync: typeof anyByRightAsync; + + /** + * Splits values into two groups according to a predicate function. + * + * ## Notes + * + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') + * @param predicate - predicate function specifying which group an element in the input collection belongs to + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.bifurcateByAsync( files, predicate, done ); + */ + bifurcateByAsync: typeof bifurcateByAsync; + + /** + * Function composition. + * + * ## Notes + * + * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. + * + * @param f0 - first function to compose + * @param f1 - second function to compose + * @param f - remaining functions to compose + * @returns composite function + * + * @example + * function a( x, next ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * next( null, 2*x ); + * } + * } + * + * function b( x, next ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * next( null, x+3 ); + * } + * } + * + * function c( x, next ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * next( null, x/5 ); + * } + * } + * + * var f = ns.composeAsync( c, b, a ); + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * // => 3 + * } + * + * f( 6, done ); + */ + composeAsync: typeof composeAsync; + + /** + * Groups values according to an indicator function and returns group counts. + * + * ## Notes + * + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param indicator - indicator function specifying which group an element in the input collection belongs to + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * + * function indicator( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, 'nonreadable' ); + * } + * next( null, 'readable' ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.countByAsync( files, indicator, done ); + */ + countByAsync: typeof countByAsync; + + /** + * Invokes a function until a test condition is true. + * + * @param fcn - function to invoke + * @param predicate - function which indicates whether to continue invoking a function + * @param done - callback to invoke upon completion + * @param thisArg - execution context for the invoked function + * + * @example + * function fcn( i, next ) { + * setTimeout( onTimeout, i ); + * function onTimeout() { + * console.log( 'beep: %d', i ); + * next(); + * } + * } + * + * function predicate( i, clbk ) { + * clbk( null, i >= 5 ); + * } + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * } + * + * ns.doUntilAsync( fcn, predicate, done ); + */ + doUntilAsync: typeof doUntilAsync; + + /** + * Invokes a function while a test condition is true. + * + * @param fcn - function to invoke + * @param predicate - function which indicates whether to continue invoking a function + * @param done - callback to invoke upon completion + * @param thisArg - execution context for the invoked function + * + * @example + * function fcn( i, next ) { + * setTimeout( onTimeout, i ); + * function onTimeout() { + * console.log( 'beep: %d', i ); + * next(); + * } + * } + * + * function predicate( i, clbk ) { + * clbk( null, i < 5 ); + * } + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * } + * + * ns.doWhileAsync( fcn, predicate, done ); + */ + doWhileAsync: typeof doWhileAsync; + + /** + * Tests whether all elements in a collection pass a test implemented by a predicate function. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Successfully read all files.' ); + * } else { + * console.log( 'Was unable to read all files.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.everyByAsync( files, predicate, done ); + */ + everyByAsync: typeof everyByAsync; + + /** + * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Successfully read all files.' ); + * } else { + * console.log( 'Was unable to read all files.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.everyByRightAsync( files, predicate, done ); + */ + everyByRightAsync: typeof everyByRightAsync; + + /** + * Invokes a function once for each element in a collection. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param fcn - function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * console.log( 'Successfully read all files.' ); + * } + * + * function read( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( error ); + * } + * console.log( 'Successfully read file: %s', file ); + * next(); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.forEachAsync( files, read, done ); + */ + forEachAsync: typeof forEachAsync; + + /** + * Invokes a function once for each element in a collection. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param fcn - function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * console.log( 'Successfully read all files.' ); + * } + * + * function read( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( error ); + * } + * console.log( 'Successfully read file: %s', file ); + * next(); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.forEachRightAsync( files, read, done ); + */ + forEachRightAsync: typeof forEachRightAsync; + + /** + * Function sequence. + * + * @param f0 - first function to evaluate + * @param f1 - second function to evaluate + * @param f - remaining functions to evaluate in sequential order + * @returns pipeline function + * + * @example + * function a( x, next ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * next( null, 2*x ); + * } + * } + * + * function b( x, next ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * next( null, x+3 ); + * } + * } + * + * function c( x, next ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * next( null, x/5 ); + * } + * } + * + * var f = ns.functionSequenceAsync( a, b, c ); + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * // => 3 + * } + * + * f( 6, done ); + */ + functionSequenceAsync: typeof functionSequenceAsync; + + /** + * Groups values according to an indicator function. + * + * ## Notes + * + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') + * @param indicator - indicator function specifying which group an element in the input collection belongs to + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * + * function indicator( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, 'nonreadable' ); + * } + * next( null, 'readable' ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.groupByAsync( files, indicator, done ); + */ + groupByAsync: typeof groupByAsync; + + /** + * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. + * + * @param predicate - predicate function + * @param x - value to return if a condition is truthy + * @param y - value to return if a condition is falsy + * @param done - callback to invoke upon completion + * + * @example + * var randu = require( `@stdlib/random/base/randu` ); + * + * function predicate( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * clbk( null, randu() > 0.5 ); + * } + * } + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * ns.ifelseAsync( predicate, 1.0, -1.0, done ); + */ + ifelseAsync: typeof ifelseAsync; + + /** + * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. + * + * @param predicate - predicate function + * @param x - function to invoke if a condition is truthy + * @param y - function to invoke if a condition is falsy + * @param done - callback to invoke upon completion + * + * @example + * var randu = require( `@stdlib/random/base/randu` ); + * + * function predicate( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * clbk( null, randu() > 0.5 ); + * } + * } + * + * function x( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * clbk( null, 1.0 ); + * } + * } + * + * function y( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * clbk( null, -1.0 ); + * } + * } + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * ns.ifthenAsync( predicate, x, y, done ); + */ + ifthenAsync: typeof ifthenAsync; + + /** + * Invokes a function once for each element in a collection and updates a collection in-place. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param fcn - function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, results ) { + * if ( error ) { + * throw error; + * } + * console.log( results ); + * } + * + * function read( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error, data ) { + * if ( error ) { + * return next( error ); + * } + * next( null, data ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.inmapAsync( files, read, done ); + */ + inmapAsync: typeof inmapAsync; + + /** + * Invokes a function once for each element in a collection and updates a collection in-place. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param fcn - function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, results ) { + * if ( error ) { + * throw error; + * } + * console.log( results ); + * } + * + * function read( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error, data ) { + * if ( error ) { + * return next( error ); + * } + * next( null, data ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.inmapRightAsync( files, read, done ); + */ + inmapRightAsync: typeof inmapRightAsync; + + /** + * Invokes a function `n` times and returns an array of accumulated function return values. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param fcn - function to invoke + * @param n - number of function invocations + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) + * @param done - callback to invoke upon invoking a function `n` times + * @throws second argument must be a nonnegative integer + * @throws must provide valid options + * + * @example + * function fcn( i, next ) { + * setTimeout( onTimeout, i ); + * function onTimeout() { + * next( null, i ); + * } + * } + * + * function done( error, out ) { + * if ( error ) { + * throw error; + * } + * console.log( JSON.stringify( out ) ); + * // => [ 0, 1, 2, 3, 4 ] + * } + * + * ns.mapFunAsync( fcn, 5, done ); + */ + mapFunAsync: typeof mapFunAsync; + + /** + * Maps keys from one object to a new object having the same values. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * - Iteration and insertion order are **not** guaranteed. + * - The function only operates on own properties, not inherited properties. + * + * + * @param obj - source object + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) + * @param transform - transform function + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function read( key, value, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( value, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, key+':unreadable' ); + * } + * next( null, key+':readable' ); + * } + * } + * + * // Define a callback which handles errors: + * function done( error, out ) { + * if ( error ) { + * throw error; + * } + * console.log( out ); + * } + * + * // Create a dictionary of file names: + * var files = { + * 'file1': './beep.js', + * 'file2': './boop.js' + * }; + * + * var opts = { + * 'series': true + * }; + * + * // Process each file in `files`: + * ns.mapKeysAsync( files, opts, read, done ); + */ + mapKeysAsync: typeof mapKeysAsync; + + /** + * Maps values from one object to a new object having the same keys. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * - Iteration and insertion order are **not** guaranteed. + * - The function only operates on own properties, not inherited properties. + * + * + * @param obj - source object + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) + * @param transform - transform function + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var stat = require( `fs` ).stat; + * + * function getStats( file, next ) { + * stat( file, onStats ); + * + * function onStats( error, data ) { + * if ( error ) { + * return next( error ); + * } + * next( null, data ); + * } + * } + * + * // Define a callback which handles errors: + * function done( error, out ) { + * if ( error ) { + * throw error; + * } + * console.log( out ); + * } + * + * // Create a dictionary of file names: + * var files = { + * 'file1': './beep.js', + * 'file2': './boop.js' + * }; + * + * var opts = { + * 'series': true + * }; + * + * // Process each file in `files`: + * ns.mapValuesAsync( files, opts, getStats, done ); + */ + mapValuesAsync: typeof mapValuesAsync; + + /** + * Tests whether all elements in a collection fail a test implemented by a predicate function. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Was unable to read all files.' ); + * } else { + * console.log( 'Was able to read at least one file.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.noneByAsync( files, predicate, done ); + */ + noneByAsync: typeof noneByAsync; + + /** + * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Was unable to read all files.' ); + * } else { + * console.log( 'Was able to read at least one file.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.noneByRightAsync( files, predicate, done ); + */ + noneByRightAsync: typeof noneByRightAsync; + + /** + * Applies a function against an accumulator and each element in a collection and return the accumulated result. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param initial - initial value + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) + * @param reducer - function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, acc ) { + * if ( error ) { + * throw error; + * } + * console.log( acc.count ); + * } + * + * function read( acc, file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, acc ); + * } + * acc.count += 1; + * next( null, acc ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * var acc = { + * 'count': 0 + * }; + * ns.reduceAsync( files, acc, read, done ); + */ + reduceAsync: typeof reduceAsync; + + /** + * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. + * + * ## Notes + * + * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param initial - initial value + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) + * @param reducer - function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, acc ) { + * if ( error ) { + * throw error; + * } + * console.log( acc.count ); + * } + * + * function read( acc, file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, acc ); + * } + * acc.count += 1; + * next( null, acc ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * var acc = { + * 'count': 0 + * }; + * ns.reduceRightAsync( files, acc, read, done ); + */ + reduceRightAsync: typeof reduceRightAsync; + + /** + * Executes functions in series, passing the results of one function as arguments to the next function. + * + * @param fcns - array of functions + * @param clbk - callback to invoke upon completion + * @param thisArg - function context + * + * @example + * function foo( next ) { + * next( null, 'beep' ); + * } + * + * function bar( str, next ) { + * console.log( str ); + * // => 'beep' + * + * next(); + * } + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * } + * + * var fcns = [ foo, bar ]; + * + * ns.waterfall( fcns, done ); + */ + waterfall: typeof waterfall; + + /** + * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param n - number of elements + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws second argument must be a positive integer + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Successfully read some files.' ); + * } else { + * console.log( 'Unable to read some files.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.someByAsync( files, 2, predicate, done ); + */ + someByAsync: typeof someByAsync; + + /** + * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. + * + * ## Notes + * + * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * + * @param collection - input collection + * @param n - number of elements + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param predicate - predicate function to invoke for each element in a collection + * @param done - function to invoke upon completion + * @throws second argument must be a positive integer + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, bool ) { + * if ( error ) { + * throw error; + * } + * if ( bool ) { + * console.log( 'Successfully read some files.' ); + * } else { + * console.log( 'Unable to read some files.' ); + * } + * } + * + * function predicate( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, false ); + * } + * next( null, true ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.someByRightAsync( files, 2, predicate, done ); + */ + someByRightAsync: typeof someByRightAsync; + + /** + * Generates a frequency table according to an indicator function. + * + * ## Notes + * + * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). + * + * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: + * + * - 0: unique value + * - 1: value count + * - 2: frequency percentage + * + * + * @param collection - input collection + * @param options - function options + * @param options.thisArg - execution context + * @param options.limit - maximum number of pending invocations at any one time + * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) + * @param indicator - function whose return values are used to populate the output frequency table + * @param done - function to invoke upon completion + * @throws must provide valid options + * + * @example + * var readFile = require( `@stdlib/fs/read-file` ); + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * + * function indicator( file, next ) { + * var opts = { + * 'encoding': 'utf8' + * }; + * readFile( file, opts, onFile ); + * + * function onFile( error ) { + * if ( error ) { + * return next( null, 'nonreadable' ); + * } + * next( null, 'readable' ); + * } + * } + * + * var files = [ + * './beep.js', + * './boop.js' + * ]; + * + * ns.tabulateByAsync( files, indicator, done ); + */ + tabulateByAsync: typeof tabulateByAsync; + + /** + * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. + * + * @param x - function to invoke + * @param y - value to return if `x` returns an error + * @param done - callback to invoke upon completion + * + * @example + * var randu = require( `@stdlib/random/base/randu` ); + * + * function x( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * if ( randu() > 0.5 ) { + * return clbk( null, 1.0 ); + * } + * clbk( new Error( 'beep' ) ); + * } + * } + * + * function done( error, result ) { + * if ( error ) { + * console.log( error.message ); + * } + * console.log( result ); + * } + * + * ns.trycatchAsync( x, -1.0, done ); + */ + trycatchAsync: typeof trycatchAsync; + + /** + * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. + * + * @param x - function to invoke + * @param y - function to invoke if `x` returns an error + * @param done - callback to invoke upon completion + * + * @example + * var randu = require( `@stdlib/random/base/randu` ); + * + * function x( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * if ( randu() > 0.5 ) { + * return clbk( null, 1.0 ); + * } + * clbk( new Error( 'beep' ) ); + * } + * } + * + * function y( clbk ) { + * setTimeout( onTimeout, 0 ); + * function onTimeout() { + * clbk( null, -1.0 ); + * } + * } + * + * function done( error, result ) { + * if ( error ) { + * throw error; + * } + * console.log( result ); + * } + * + * ns.trythenAsync( x, y, done ); + */ + trythenAsync: typeof trythenAsync; + + /** + * Invokes a function until a test condition is true. + * + * @param predicate - function which indicates whether to continue invoking a function + * @param fcn - function to invoke + * @param done - callback to invoke upon completion + * @param thisArg - execution context for the invoked function + * + * @example + * function predicate( i, clbk ) { + * clbk( null, i >= 5 ); + * } + * + * function fcn( i, next ) { + * setTimeout( onTimeout, i ); + * function onTimeout() { + * console.log( 'beep: %d', i ); + * next(); + * } + * } + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * } + * + * ns.untilAsync( predicate, fcn, done ); + */ + untilAsync: typeof untilAsync; + + /** + * Invokes a function while a test condition is true. + * + * @param predicate - function which indicates whether to continue invoking a function + * @param fcn - function to invoke + * @param done - callback to invoke upon completion + * @param thisArg - execution context for the invoked function + * + * @example + * function predicate( i, clbk ) { + * clbk( null, i < 5 ); + * } + * + * function fcn( i, next ) { + * setTimeout( onTimeout, i ); + * function onTimeout() { + * console.log( 'beep: %d', i ); + * next(); + * } + * } + * + * function done( error ) { + * if ( error ) { + * throw error; + * } + * } + * + * ns.whileAsync( predicate, fcn, done ); + */ + whileAsync: typeof whileAsync; +} + +/** +* Standard async utilities. +*/ +declare var ns: Namespace; + + +// EXPORTS // + +export = ns; diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..0d4dad1 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V=s,W={};V(W,"anyByAsync",t),V(W,"anyByRightAsync",e),V(W,"bifurcateByAsync",n),V(W,"composeAsync",i),V(W,"countByAsync",d),V(W,"doUntilAsync",l),V(W,"doWhileAsync",r),V(W,"everyByAsync",m),V(W,"everyByRightAsync",c),V(W,"forEachAsync",y),V(W,"forEachRightAsync",a),V(W,"functionSequenceAsync",j),V(W,"groupByAsync",o),V(W,"ifelseAsync",h),V(W,"ifthenAsync",p),V(W,"inmapAsync",u),V(W,"inmapRightAsync",f),V(W,"mapFunAsync",x),V(W,"mapKeysAsync",b),V(W,"mapValuesAsync",g),V(W,"noneByAsync",v),V(W,"noneByRightAsync",A),V(W,"reduceAsync",B),V(W,"reduceRightAsync",R),V(W,"waterfall",w),V(W,"someByAsync",q),V(W,"someByRightAsync",E),V(W,"tabulateByAsync",k),V(W,"trycatchAsync",F),V(W,"trythenAsync",K),V(W,"untilAsync",S),V(W,"whileAsync",U);var z=W;export{z as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..3bd0a16 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\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","require$$17","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","require$$28","require$$29","require$$30","require$$31","require$$32","lib"],"mappings":";;65MA0BA,IAAAA,EAAAC,EAUAC,EAAA,GASAF,EAAAE,EAAA,aAAAC,GASAH,EAAAE,EAAA,kBAAAE,GASAJ,EAAAE,EAAA,mBAAAG,GASAL,EAAAE,EAAA,eAAAI,GASAN,EAAAE,EAAA,eAAAK,GASAP,EAAAE,EAAA,eAAAM,GASAR,EAAAE,EAAA,eAAAO,GASAT,EAAAE,EAAA,eAAAQ,GASAV,EAAAE,EAAA,oBAAAS,GASAX,EAAAE,EAAA,eAAAU,GASAZ,EAAAE,EAAA,oBAAAW,GASAb,EAAAE,EAAA,wBAAAY,GASAd,EAAAE,EAAA,eAAAa,GASAf,EAAAE,EAAA,cAAAc,GASAhB,EAAAE,EAAA,cAAAe,GASAjB,EAAAE,EAAA,aAAAgB,GASAlB,EAAAE,EAAA,kBAAAiB,GASAnB,EAAAE,EAAA,cAAAkB,GASApB,EAAAE,EAAA,eAAAmB,GASArB,EAAAE,EAAA,iBAAAoB,GASAtB,EAAAE,EAAA,cAAAqB,GASAvB,EAAAE,EAAA,mBAAAsB,GASAxB,EAAAE,EAAA,cAAAuB,GASAzB,EAAAE,EAAA,mBAAAwB,GASA1B,EAAAE,EAAA,YAAAyB,GASA3B,EAAAE,EAAA,cAAA0B,GASA5B,EAAAE,EAAA,mBAAA2B,GASA7B,EAAAE,EAAA,kBAAA4B,GASA9B,EAAAE,EAAA,gBAAA6B,GASA/B,EAAAE,EAAA,eAAA8B,GASAhC,EAAAE,EAAA,aAAA+B,GASAjC,EAAAE,EAAA,aAAAgC,GAKA,IAAAC,EAAAjC"} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..a6d114f --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "@stdlib/utils-async", + "version": "0.0.0", + "description": "Standard async utilities.", + "license": "Apache-2.0", + "type": "module", + "main": "./index.mjs", + "homepage": "https://stdlib.io", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/utils-async.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "keywords": [ + "stdlib", + "stdutil", + "utilities", + "utility", + "utils", + "util", + "async", + "asynchronous" + ], + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/athan" + } +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b950f31 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + From a039d11f928318357ef0e9305039fcf7197c280c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 00:30:10 +0000 Subject: [PATCH 002/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 2d175598e82e6be222039050f20cd3b47fcf57c5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 06:17:04 +0000 Subject: [PATCH 003/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 0d4dad1..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V=s,W={};V(W,"anyByAsync",t),V(W,"anyByRightAsync",e),V(W,"bifurcateByAsync",n),V(W,"composeAsync",i),V(W,"countByAsync",d),V(W,"doUntilAsync",l),V(W,"doWhileAsync",r),V(W,"everyByAsync",m),V(W,"everyByRightAsync",c),V(W,"forEachAsync",y),V(W,"forEachRightAsync",a),V(W,"functionSequenceAsync",j),V(W,"groupByAsync",o),V(W,"ifelseAsync",h),V(W,"ifthenAsync",p),V(W,"inmapAsync",u),V(W,"inmapRightAsync",f),V(W,"mapFunAsync",x),V(W,"mapKeysAsync",b),V(W,"mapValuesAsync",g),V(W,"noneByAsync",v),V(W,"noneByRightAsync",A),V(W,"reduceAsync",B),V(W,"reduceRightAsync",R),V(W,"waterfall",w),V(W,"someByAsync",q),V(W,"someByRightAsync",E),V(W,"tabulateByAsync",k),V(W,"trycatchAsync",F),V(W,"trythenAsync",K),V(W,"untilAsync",S),V(W,"whileAsync",U);var z=W;export{z as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 3bd0a16..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\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","require$$17","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","require$$28","require$$29","require$$30","require$$31","require$$32","lib"],"mappings":";;65MA0BA,IAAAA,EAAAC,EAUAC,EAAA,GASAF,EAAAE,EAAA,aAAAC,GASAH,EAAAE,EAAA,kBAAAE,GASAJ,EAAAE,EAAA,mBAAAG,GASAL,EAAAE,EAAA,eAAAI,GASAN,EAAAE,EAAA,eAAAK,GASAP,EAAAE,EAAA,eAAAM,GASAR,EAAAE,EAAA,eAAAO,GASAT,EAAAE,EAAA,eAAAQ,GASAV,EAAAE,EAAA,oBAAAS,GASAX,EAAAE,EAAA,eAAAU,GASAZ,EAAAE,EAAA,oBAAAW,GASAb,EAAAE,EAAA,wBAAAY,GASAd,EAAAE,EAAA,eAAAa,GASAf,EAAAE,EAAA,cAAAc,GASAhB,EAAAE,EAAA,cAAAe,GASAjB,EAAAE,EAAA,aAAAgB,GASAlB,EAAAE,EAAA,kBAAAiB,GASAnB,EAAAE,EAAA,cAAAkB,GASApB,EAAAE,EAAA,eAAAmB,GASArB,EAAAE,EAAA,iBAAAoB,GASAtB,EAAAE,EAAA,cAAAqB,GASAvB,EAAAE,EAAA,mBAAAsB,GASAxB,EAAAE,EAAA,cAAAuB,GASAzB,EAAAE,EAAA,mBAAAwB,GASA1B,EAAAE,EAAA,YAAAyB,GASA3B,EAAAE,EAAA,cAAA0B,GASA5B,EAAAE,EAAA,mBAAA2B,GASA7B,EAAAE,EAAA,kBAAA4B,GASA9B,EAAAE,EAAA,gBAAA6B,GASA/B,EAAAE,EAAA,eAAA8B,GASAhC,EAAAE,EAAA,aAAA+B,GASAjC,EAAAE,EAAA,aAAAgC,GAKA,IAAAC,EAAAjC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b950f31..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 3c61e41d7697539423cdebd92bc949bf40d4adf6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 06:18:15 +0000 Subject: [PATCH 004/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2748 insertions(+), 3481 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 468c61e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-06-30T22:09:24.385Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..463e835 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5365ec286095a6f42a2ce82e3d483b772b4273cc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 17:52:16 +0000 Subject: [PATCH 005/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From f8af94cf5ca844c589b073c273cc3ff705ba092a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Jul 2022 08:08:20 +0000 Subject: [PATCH 006/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 463e835..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From c81f52ae818cad32b8248795e6cb83ea72caa90a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Jul 2022 08:09:23 +0000 Subject: [PATCH 007/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2748 insertions(+), 3481 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 5032539..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-07-01T01:12:56.088Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4ff358d --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 010d27a140007ea0ccf8377e433a7bb1f01d88fa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 5 Jul 2022 12:46:00 +0000 Subject: [PATCH 008/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 6caad2d2ad2392b127dd9500257613541cae439b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 5 Jul 2022 13:09:26 +0000 Subject: [PATCH 009/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4ff358d..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 00e8413ef800253082c4807f544cae2b00ff913d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 5 Jul 2022 13:10:28 +0000 Subject: [PATCH 010/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2748 insertions(+), 3446 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 bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..fd461a6 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From bc2f60c2ca251b6c8d92d5f1b45d8e3f75c62f92 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 03:42:40 +0000 Subject: [PATCH 011/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 1335c0b912fe42b3773f788814f1d9c48a4a6a8b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 10:55:37 +0000 Subject: [PATCH 012/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index fd461a6..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From c1467ca1e92c246eb6a8f6a7c99bdad0139e35ed Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 10:57:09 +0000 Subject: [PATCH 013/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2748 insertions(+), 3520 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 42520c6..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-08-01T01:16:05.488Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8717e26 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b2bde7759baf61ed1fe8d7a6ade34093db923779 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 03:33:24 +0000 Subject: [PATCH 014/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From d9e8113314c5bd072a8ed26856c55ab77b112955 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 16:47:23 +0000 Subject: [PATCH 015/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8717e26..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 5af663713049c63498f4c52d4352c72cda620b7c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 16:48:35 +0000 Subject: [PATCH 016/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2748 insertions(+), 3536 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 cb9c2d0..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-09-01T01:14:02.623Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2bd3fcd --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c921352230785f9b2c19fd1638b0642b81320917 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 17 Sep 2022 19:28:35 +0000 Subject: [PATCH 017/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From f58b1c86d7f6ef6d19f2decf749d5cf4e66e92d9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 17 Sep 2022 19:40:57 +0000 Subject: [PATCH 018/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2bd3fcd..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 248615607c4a5e1fe1188315467eb6b5a6485dad Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 17 Sep 2022 19:42:13 +0000 Subject: [PATCH 019/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2748 insertions(+), 3535 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 bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..00d4ed9 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 950b340719b9a56ac328431bc3012bf3d880293c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 04:43:47 +0000 Subject: [PATCH 020/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 0a76e8e219851223904cf2cd0bef86544cbacb56 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 19:36:25 +0000 Subject: [PATCH 021/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 00d4ed9..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 9cd278bb2c4bbcc8bc319da94ee797215eded464 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 19:37:43 +0000 Subject: [PATCH 022/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2748 insertions(+), 3536 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 f20f0ff..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-10-01T01:40:08.032Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 076624e..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 async = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - async; // $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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..84bd0a1 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From bc5016d556132ab122055bb47123c8908e85f795 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 21:54:58 +0000 Subject: [PATCH 023/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 1b8e5f8024824f56c9fd0d7519d246ad9c1142b6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:42:09 +0000 Subject: [PATCH 024/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 84bd0a1..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 25ba14e7e53abbd0bf14bdf75b8a3400e198a370 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:43:14 +0000 Subject: [PATCH 025/126] 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 | 105 +- 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 | 330 --- package.json | 105 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2748 insertions(+), 3535 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 bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ba8046c --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..664bb61 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 61a16e97bad9da9cd42c6daae6cff81c97bf3c36 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 03:03:59 +0000 Subject: [PATCH 026/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From b6cf4c253f97cfd480bbd90a6e5cdb49d33ef48b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 13:25:44 +0000 Subject: [PATCH 027/126] Remove files --- index.d.ts | 1580 ----------------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 4274 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ba8046c..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 664bb61..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 0bd04040db39b76df4c42f0f949031d0285d52b6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 13:26:53 +0000 Subject: [PATCH 028/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4103 insertions(+), 3536 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 98851ed..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-11-01T01:27:13.157Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29504c8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4476d3f --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 888157c7063869c758c486671aaa90f7882bf247 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 00:13:36 +0000 Subject: [PATCH 029/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e03c..87ff209 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From a013d9b4e3cfa2e14c8099470b05c3a79b230f2c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 13:35:11 +0000 Subject: [PATCH 030/126] Remove files --- index.d.ts | 1580 ------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5629 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29504c8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4476d3f..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From f7e25666c4a7a0a9ce2ae855ad6a31927b887ba4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 13:36:17 +0000 Subject: [PATCH 031/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4103 insertions(+), 3557 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 3e00864..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-11-03T22:05:42.104Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29504c8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 87ff209..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2b38ce1 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b698e928c831e332fe8605ca5d2ab9997d402227 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 04:04:37 +0000 Subject: [PATCH 032/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4338c78..edf6397 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 7c41fc94534a59f00d023bc497bdc3d956ff2385 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 14:39:39 +0000 Subject: [PATCH 033/126] Remove files --- index.d.ts | 1580 ------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5629 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29504c8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2b38ce1..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From f553c8290b0bd96363d2a583f4c6d40f6bfdb300 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 14:40:44 +0000 Subject: [PATCH 034/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4103 insertions(+), 3562 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 982d98a..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-12-01T01:55:07.885Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..c5df394 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index edf6397..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..203d091 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5727bf24b0cd4f94445891829087ca0cb5965691 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 03:36:08 +0000 Subject: [PATCH 035/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d40d426..3b3b479 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 9170d63a0c3e7ffb5f8de3a87eb7fffeb856c044 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 08:48:02 +0000 Subject: [PATCH 036/126] Remove files --- index.d.ts | 1580 ------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5629 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index c5df394..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 203d091..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 6c3ef959fa6efcaa090ec5e568b99247821bf0fd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 08:49:10 +0000 Subject: [PATCH 037/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4103 insertions(+), 3573 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 86cf62d..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-01-01T01:17:39.668Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3b3b479..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8229e3d --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 304c909dfd0c00b135f7cff1a9a86a14d43f5211 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 03:52:44 +0000 Subject: [PATCH 038/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d40d426..3b3b479 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.x", "@stdlib/math-base-special-ceil": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/string-repeat": "^0.0.x", "@stdlib/string-replace": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From e69ce1fba82baa4324ef2d636841278beb3ecdce Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 12:14:19 +0000 Subject: [PATCH 039/126] Remove files --- index.d.ts | 1580 ------------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5629 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8229e3d..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From b55a3b3b1e9763a55bd043be1b24cf1ec617a589 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 12:15:43 +0000 Subject: [PATCH 040/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3573 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 4e48203..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-02-01T01:42:50.375Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index c0f6db5..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/utils/async" -click B href "https://github.com/stdlib-js/utils-async/tree/main" -click C href "https://github.com/stdlib-js/utils-async/tree/production" -click D href "https://github.com/stdlib-js/utils-async/tree/esm" -click E href "https://github.com/stdlib-js/utils-async/tree/deno" -click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3b3b479..b0a90f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.x", - "@stdlib/utils-async-any-by-right": "^0.0.x", - "@stdlib/utils-async-bifurcate-by": "^0.0.x", - "@stdlib/utils-async-compose": "^0.0.x", - "@stdlib/utils-async-count-by": "^0.0.x", - "@stdlib/utils-async-do-until": "^0.0.x", - "@stdlib/utils-async-do-while": "^0.0.x", - "@stdlib/utils-async-every-by": "^0.0.x", - "@stdlib/utils-async-every-by-right": "^0.0.x", - "@stdlib/utils-async-for-each": "^0.0.x", - "@stdlib/utils-async-for-each-right": "^0.0.x", - "@stdlib/utils-async-function-sequence": "^0.0.x", - "@stdlib/utils-async-group-by": "^0.0.x", - "@stdlib/utils-async-if-else": "^0.0.x", - "@stdlib/utils-async-if-then": "^0.0.x", - "@stdlib/utils-async-inmap": "^0.0.x", - "@stdlib/utils-async-inmap-right": "^0.0.x", - "@stdlib/utils-async-map-function": "^0.0.x", - "@stdlib/utils-async-map-keys": "^0.0.x", - "@stdlib/utils-async-map-values": "^0.0.x", - "@stdlib/utils-async-none-by": "^0.0.x", - "@stdlib/utils-async-none-by-right": "^0.0.x", - "@stdlib/utils-async-reduce": "^0.0.x", - "@stdlib/utils-async-reduce-right": "^0.0.x", - "@stdlib/utils-async-series-waterfall": "^0.0.x", - "@stdlib/utils-async-some-by": "^0.0.x", - "@stdlib/utils-async-some-by-right": "^0.0.x", - "@stdlib/utils-async-tabulate-by": "^0.0.x", - "@stdlib/utils-async-try-catch": "^0.0.x", - "@stdlib/utils-async-try-then": "^0.0.x", - "@stdlib/utils-async-until": "^0.0.x", - "@stdlib/utils-async-while": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-array": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-function-array": "^0.0.x", - "@stdlib/assert-is-nan": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-positive-integer": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/constants-float64-eps": "^0.0.x", - "@stdlib/constants-float64-pinf": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/math-base-assert-is-nan": "^0.0.x", - "@stdlib/math-base-special-ceil": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/string-repeat": "^0.0.x", - "@stdlib/string-replace": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-index-of": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..f2bf821 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 03fe7f6b79143498ab16e6cc5255772e27137009 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 06:43:03 +0000 Subject: [PATCH 041/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba04c8..92dd398 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.8", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/string-repeat": "^0.0.9", "@stdlib/string-replace": "^0.0.11", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From 4010a6c0605879c9532008e4e8a2fbf2039be955 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 15:53:18 +0000 Subject: [PATCH 042/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index f2bf821..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 482bd27cf037eff0fdb81c2fc61ce3f16a3a8557 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 15:54:34 +0000 Subject: [PATCH 043/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3708 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 bfc6bfb..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-03-01T04:19:30.793Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 92dd398..e708bb9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.8", - "@stdlib/utils-async-any-by-right": "^0.0.8", - "@stdlib/utils-async-bifurcate-by": "^0.0.8", - "@stdlib/utils-async-compose": "^0.0.8", - "@stdlib/utils-async-count-by": "^0.0.8", - "@stdlib/utils-async-do-until": "^0.0.8", - "@stdlib/utils-async-do-while": "^0.0.8", - "@stdlib/utils-async-every-by": "^0.0.8", - "@stdlib/utils-async-every-by-right": "^0.0.8", - "@stdlib/utils-async-for-each": "^0.0.8", - "@stdlib/utils-async-for-each-right": "^0.0.8", - "@stdlib/utils-async-function-sequence": "^0.0.8", - "@stdlib/utils-async-group-by": "^0.0.8", - "@stdlib/utils-async-if-else": "^0.0.7", - "@stdlib/utils-async-if-then": "^0.0.7", - "@stdlib/utils-async-inmap": "^0.0.8", - "@stdlib/utils-async-inmap-right": "^0.0.8", - "@stdlib/utils-async-map-function": "^0.0.8", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.0.8", - "@stdlib/utils-async-none-by-right": "^0.0.8", - "@stdlib/utils-async-reduce": "^0.0.8", - "@stdlib/utils-async-reduce-right": "^0.0.8", - "@stdlib/utils-async-series-waterfall": "^0.0.8", - "@stdlib/utils-async-some-by": "^0.0.8", - "@stdlib/utils-async-some-by-right": "^0.0.8", - "@stdlib/utils-async-tabulate-by": "^0.0.8", - "@stdlib/utils-async-try-catch": "^0.0.7", - "@stdlib/utils-async-try-then": "^0.0.7", - "@stdlib/utils-async-until": "^0.0.8", - "@stdlib/utils-async-while": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-function-array": "^0.0.7", - "@stdlib/assert-is-nan": "^0.0.8", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-positive-integer": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/string-repeat": "^0.0.9", - "@stdlib/string-replace": "^0.0.11", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-index-of": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-noop": "^0.0.14", - "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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..cbcb978 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 87eb7237fb6bf15c8c2f095b3aaee1a9fca0a2be Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 07:16:40 +0000 Subject: [PATCH 044/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba04c8..92dd398 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.8", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/string-repeat": "^0.0.9", "@stdlib/string-replace": "^0.0.11", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From f4af83a9bc8d859922f6da2c79a9f0bbe009a467 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 14:53:14 +0000 Subject: [PATCH 045/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index cbcb978..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 0a55741f6aaaf659a7ab3b9697f80b6d1b9eee9a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 14:54:54 +0000 Subject: [PATCH 046/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3714 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 66bf19b..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-04-01T04:58:17.381Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 92dd398..e708bb9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.8", - "@stdlib/utils-async-any-by-right": "^0.0.8", - "@stdlib/utils-async-bifurcate-by": "^0.0.8", - "@stdlib/utils-async-compose": "^0.0.8", - "@stdlib/utils-async-count-by": "^0.0.8", - "@stdlib/utils-async-do-until": "^0.0.8", - "@stdlib/utils-async-do-while": "^0.0.8", - "@stdlib/utils-async-every-by": "^0.0.8", - "@stdlib/utils-async-every-by-right": "^0.0.8", - "@stdlib/utils-async-for-each": "^0.0.8", - "@stdlib/utils-async-for-each-right": "^0.0.8", - "@stdlib/utils-async-function-sequence": "^0.0.8", - "@stdlib/utils-async-group-by": "^0.0.8", - "@stdlib/utils-async-if-else": "^0.0.7", - "@stdlib/utils-async-if-then": "^0.0.7", - "@stdlib/utils-async-inmap": "^0.0.8", - "@stdlib/utils-async-inmap-right": "^0.0.8", - "@stdlib/utils-async-map-function": "^0.0.8", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.0.8", - "@stdlib/utils-async-none-by-right": "^0.0.8", - "@stdlib/utils-async-reduce": "^0.0.8", - "@stdlib/utils-async-reduce-right": "^0.0.8", - "@stdlib/utils-async-series-waterfall": "^0.0.8", - "@stdlib/utils-async-some-by": "^0.0.8", - "@stdlib/utils-async-some-by-right": "^0.0.8", - "@stdlib/utils-async-tabulate-by": "^0.0.8", - "@stdlib/utils-async-try-catch": "^0.0.7", - "@stdlib/utils-async-try-then": "^0.0.7", - "@stdlib/utils-async-until": "^0.0.8", - "@stdlib/utils-async-while": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-function-array": "^0.0.7", - "@stdlib/assert-is-nan": "^0.0.8", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-positive-integer": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/string-repeat": "^0.0.9", - "@stdlib/string-replace": "^0.0.11", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-index-of": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-noop": "^0.0.14", - "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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..378cbcd --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 31e9ff9d2556965d1d4828f81e281f2a90ac0f16 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 May 2023 06:59:58 +0000 Subject: [PATCH 047/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba04c8..92dd398 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.8", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/string-repeat": "^0.0.9", "@stdlib/string-replace": "^0.0.11", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From 4a32ebcf11b922dc584f990de66dd636e07c5340 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 May 2023 14:31:37 +0000 Subject: [PATCH 048/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 378cbcd..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 57497d581d8180f5a98fca82e4e5c198d742a1f0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 May 2023 14:32:51 +0000 Subject: [PATCH 049/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3714 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 84b2014..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-05-01T04:41:17.288Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 92dd398..e708bb9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.8", - "@stdlib/utils-async-any-by-right": "^0.0.8", - "@stdlib/utils-async-bifurcate-by": "^0.0.8", - "@stdlib/utils-async-compose": "^0.0.8", - "@stdlib/utils-async-count-by": "^0.0.8", - "@stdlib/utils-async-do-until": "^0.0.8", - "@stdlib/utils-async-do-while": "^0.0.8", - "@stdlib/utils-async-every-by": "^0.0.8", - "@stdlib/utils-async-every-by-right": "^0.0.8", - "@stdlib/utils-async-for-each": "^0.0.8", - "@stdlib/utils-async-for-each-right": "^0.0.8", - "@stdlib/utils-async-function-sequence": "^0.0.8", - "@stdlib/utils-async-group-by": "^0.0.8", - "@stdlib/utils-async-if-else": "^0.0.7", - "@stdlib/utils-async-if-then": "^0.0.7", - "@stdlib/utils-async-inmap": "^0.0.8", - "@stdlib/utils-async-inmap-right": "^0.0.8", - "@stdlib/utils-async-map-function": "^0.0.8", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.0.8", - "@stdlib/utils-async-none-by-right": "^0.0.8", - "@stdlib/utils-async-reduce": "^0.0.8", - "@stdlib/utils-async-reduce-right": "^0.0.8", - "@stdlib/utils-async-series-waterfall": "^0.0.8", - "@stdlib/utils-async-some-by": "^0.0.8", - "@stdlib/utils-async-some-by-right": "^0.0.8", - "@stdlib/utils-async-tabulate-by": "^0.0.8", - "@stdlib/utils-async-try-catch": "^0.0.7", - "@stdlib/utils-async-try-then": "^0.0.7", - "@stdlib/utils-async-until": "^0.0.8", - "@stdlib/utils-async-while": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-function-array": "^0.0.7", - "@stdlib/assert-is-nan": "^0.0.8", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-positive-integer": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/string-repeat": "^0.0.9", - "@stdlib/string-replace": "^0.0.11", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-index-of": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-noop": "^0.0.14", - "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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..9b897cb --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 321d424ac7acfaeb38451b90399bdea466ee4f66 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Jun 2023 06:44:01 +0000 Subject: [PATCH 050/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba04c8..92dd398 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.8", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/string-repeat": "^0.0.9", "@stdlib/string-replace": "^0.0.11", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From df39dc91bde1165ad1cf313405e9806b02e58ad6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Jun 2023 14:50:40 +0000 Subject: [PATCH 051/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 9b897cb..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b5636c0dca84d58dfe0441664c618a525fc4624f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Jun 2023 14:52:04 +0000 Subject: [PATCH 052/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3714 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 b79cf48..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-06-01T04:18:42.853Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 92dd398..e708bb9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.8", - "@stdlib/utils-async-any-by-right": "^0.0.8", - "@stdlib/utils-async-bifurcate-by": "^0.0.8", - "@stdlib/utils-async-compose": "^0.0.8", - "@stdlib/utils-async-count-by": "^0.0.8", - "@stdlib/utils-async-do-until": "^0.0.8", - "@stdlib/utils-async-do-while": "^0.0.8", - "@stdlib/utils-async-every-by": "^0.0.8", - "@stdlib/utils-async-every-by-right": "^0.0.8", - "@stdlib/utils-async-for-each": "^0.0.8", - "@stdlib/utils-async-for-each-right": "^0.0.8", - "@stdlib/utils-async-function-sequence": "^0.0.8", - "@stdlib/utils-async-group-by": "^0.0.8", - "@stdlib/utils-async-if-else": "^0.0.7", - "@stdlib/utils-async-if-then": "^0.0.7", - "@stdlib/utils-async-inmap": "^0.0.8", - "@stdlib/utils-async-inmap-right": "^0.0.8", - "@stdlib/utils-async-map-function": "^0.0.8", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.0.8", - "@stdlib/utils-async-none-by-right": "^0.0.8", - "@stdlib/utils-async-reduce": "^0.0.8", - "@stdlib/utils-async-reduce-right": "^0.0.8", - "@stdlib/utils-async-series-waterfall": "^0.0.8", - "@stdlib/utils-async-some-by": "^0.0.8", - "@stdlib/utils-async-some-by-right": "^0.0.8", - "@stdlib/utils-async-tabulate-by": "^0.0.8", - "@stdlib/utils-async-try-catch": "^0.0.7", - "@stdlib/utils-async-try-then": "^0.0.7", - "@stdlib/utils-async-until": "^0.0.8", - "@stdlib/utils-async-while": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-function-array": "^0.0.7", - "@stdlib/assert-is-nan": "^0.0.8", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-positive-integer": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/string-repeat": "^0.0.9", - "@stdlib/string-replace": "^0.0.11", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-index-of": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-noop": "^0.0.14", - "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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..368db54 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f15d3e7d18dd1c999abde3ec9c91d4d84294b030 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Jul 2023 06:39:59 +0000 Subject: [PATCH 053/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba04c8..92dd398 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.8", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/string-repeat": "^0.0.9", "@stdlib/string-replace": "^0.0.11", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From 2557e968e299387135c51c6490af5d3b7357e1dd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Jul 2023 15:07:45 +0000 Subject: [PATCH 054/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 368db54..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f28aca787706197ad1c3b8f5523e042692ac35ab Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Jul 2023 15:09:00 +0000 Subject: [PATCH 055/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3714 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 c28a2ea..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-07-01T04:17:51.438Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 92dd398..e708bb9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.8", - "@stdlib/utils-async-any-by-right": "^0.0.8", - "@stdlib/utils-async-bifurcate-by": "^0.0.8", - "@stdlib/utils-async-compose": "^0.0.8", - "@stdlib/utils-async-count-by": "^0.0.8", - "@stdlib/utils-async-do-until": "^0.0.8", - "@stdlib/utils-async-do-while": "^0.0.8", - "@stdlib/utils-async-every-by": "^0.0.8", - "@stdlib/utils-async-every-by-right": "^0.0.8", - "@stdlib/utils-async-for-each": "^0.0.8", - "@stdlib/utils-async-for-each-right": "^0.0.8", - "@stdlib/utils-async-function-sequence": "^0.0.8", - "@stdlib/utils-async-group-by": "^0.0.8", - "@stdlib/utils-async-if-else": "^0.0.7", - "@stdlib/utils-async-if-then": "^0.0.7", - "@stdlib/utils-async-inmap": "^0.0.8", - "@stdlib/utils-async-inmap-right": "^0.0.8", - "@stdlib/utils-async-map-function": "^0.0.8", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.0.8", - "@stdlib/utils-async-none-by-right": "^0.0.8", - "@stdlib/utils-async-reduce": "^0.0.8", - "@stdlib/utils-async-reduce-right": "^0.0.8", - "@stdlib/utils-async-series-waterfall": "^0.0.8", - "@stdlib/utils-async-some-by": "^0.0.8", - "@stdlib/utils-async-some-by-right": "^0.0.8", - "@stdlib/utils-async-tabulate-by": "^0.0.8", - "@stdlib/utils-async-try-catch": "^0.0.7", - "@stdlib/utils-async-try-then": "^0.0.7", - "@stdlib/utils-async-until": "^0.0.8", - "@stdlib/utils-async-while": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-function-array": "^0.0.7", - "@stdlib/assert-is-nan": "^0.0.8", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-positive-integer": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/string-repeat": "^0.0.9", - "@stdlib/string-replace": "^0.0.11", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-index-of": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-noop": "^0.0.14", - "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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..68bb587 --- /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 804c16b..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1c6b3a8b8bfb04b3b1b8ae2fb03cd84ab3a88ad9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Aug 2023 07:18:50 +0000 Subject: [PATCH 056/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba04c8..92dd398 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.0.8", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/string-repeat": "^0.0.9", "@stdlib/string-replace": "^0.0.11", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From 5a5bb39268408623114d8cdbb6f0e06d28f867c6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Aug 2023 15:53:16 +0000 Subject: [PATCH 057/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 68bb587..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9f1fe12a627dac72fba3874e13ebca034c84c6cf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Aug 2023 15:54:30 +0000 Subject: [PATCH 058/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6236 insertions(+), 3714 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 8592cfd..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T04:45:59.055Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 334eb59..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@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 + + ```
@@ -140,7 +139,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]. @@ -202,69 +201,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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..4f44c8f --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..f2fabd6 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 92dd398..e708bb9 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.0.8", - "@stdlib/utils-async-any-by-right": "^0.0.8", - "@stdlib/utils-async-bifurcate-by": "^0.0.8", - "@stdlib/utils-async-compose": "^0.0.8", - "@stdlib/utils-async-count-by": "^0.0.8", - "@stdlib/utils-async-do-until": "^0.0.8", - "@stdlib/utils-async-do-while": "^0.0.8", - "@stdlib/utils-async-every-by": "^0.0.8", - "@stdlib/utils-async-every-by-right": "^0.0.8", - "@stdlib/utils-async-for-each": "^0.0.8", - "@stdlib/utils-async-for-each-right": "^0.0.8", - "@stdlib/utils-async-function-sequence": "^0.0.8", - "@stdlib/utils-async-group-by": "^0.0.8", - "@stdlib/utils-async-if-else": "^0.0.7", - "@stdlib/utils-async-if-then": "^0.0.7", - "@stdlib/utils-async-inmap": "^0.0.8", - "@stdlib/utils-async-inmap-right": "^0.0.8", - "@stdlib/utils-async-map-function": "^0.0.8", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.0.8", - "@stdlib/utils-async-none-by-right": "^0.0.8", - "@stdlib/utils-async-reduce": "^0.0.8", - "@stdlib/utils-async-reduce-right": "^0.0.8", - "@stdlib/utils-async-series-waterfall": "^0.0.8", - "@stdlib/utils-async-some-by": "^0.0.8", - "@stdlib/utils-async-some-by-right": "^0.0.8", - "@stdlib/utils-async-tabulate-by": "^0.0.8", - "@stdlib/utils-async-try-catch": "^0.0.7", - "@stdlib/utils-async-try-then": "^0.0.7", - "@stdlib/utils-async-until": "^0.0.8", - "@stdlib/utils-async-while": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-function-array": "^0.0.7", - "@stdlib/assert-is-nan": "^0.0.8", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-positive-integer": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/string-repeat": "^0.0.9", - "@stdlib/string-replace": "^0.0.11", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-index-of": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-noop": "^0.0.14", - "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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a9db43f --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ae254df5c31bb23fb431066b636c7e1bab7c3430 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 21:23:29 +0000 Subject: [PATCH 059/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3c5996..058ad0b 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.0", "@stdlib/math-base-special-ceil": "^0.0.8", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/string-format": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", From bef4394272e5bdc97cb4e436bd3b029523a4b944 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 21:45:15 +0000 Subject: [PATCH 060/126] Remove files --- index.d.ts | 1580 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7762 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 cd10c2a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4f44c8f..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",f),s(V,"mapFunAsync",x),s(V,"mapKeysAsync",b),s(V,"mapValuesAsync",g),s(V,"noneByAsync",v),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index f2fabd6..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;65MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a9db43f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 1f1d806ec8a172d13d55b807132e5329381438a2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 21:48:07 +0000 Subject: [PATCH 061/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 37 files changed, 6236 insertions(+), 3746 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 bbd2e19..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/utils/async) 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 ca37f92..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/utils/async) 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 a7b77d1..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 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..79ca863 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.0-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.0-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.0-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.0-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.0-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.0-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.0-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.0-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.0-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.0-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.0-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.0-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 058ad0b..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.0", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.0", - "@stdlib/utils-async-do-while": "^0.1.0", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.0", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.0", - "@stdlib/utils-async-if-then": "^0.1.0", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.0.8", - "@stdlib/utils-async-map-values": "^0.0.8", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.0", - "@stdlib/utils-async-try-then": "^0.1.0", - "@stdlib/utils-async-until": "^0.1.0", - "@stdlib/utils-async-while": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-array": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.0", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.0", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.0", - "@stdlib/constants-float64-pinf": "^0.1.0", - "@stdlib/fs-read-file": "^0.1.0", - "@stdlib/math-base-assert-is-nan": "^0.1.0", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..730964e --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 03773290b4d3b782701cc4374eca572418c3156e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 21:57:19 +0000 Subject: [PATCH 062/126] 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 0a7f7d8..4b161fb 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/utils-async@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.1.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@esm/index.mjs'; +import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.1.0-esm/index.mjs'; ``` #### ns @@ -120,7 +120,7 @@ var o = ns; - - - - From d869744177233c603dabe81ed815e8354ba9ee85 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 2 Oct 2023 14:38:30 +0000 Subject: [PATCH 066/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 39 files changed, 6236 insertions(+), 3845 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 670ead8..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-10-01T03:06:20.884Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 46b615c..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: '0 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..79ca863 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.0-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.0-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.0-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.0-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.0-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.0-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.0-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.0-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.0-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.0-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.0-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.0-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 5ea0aa5..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.0", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.0", - "@stdlib/utils-async-do-while": "^0.1.0", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.0", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.0", - "@stdlib/utils-async-if-then": "^0.1.0", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.0", - "@stdlib/utils-async-try-then": "^0.1.0", - "@stdlib/utils-async-until": "^0.1.0", - "@stdlib/utils-async-while": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-array": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.0", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.0", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.0", - "@stdlib/constants-float64-pinf": "^0.1.0", - "@stdlib/fs-read-file": "^0.1.0", - "@stdlib/math-base-assert-is-nan": "^0.1.0", - "@stdlib/math-base-special-ceil": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2ee50b0 --- /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 47e82b4..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 async utilities', 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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e39e9b6d7b58499c3f87b7544e0d0bc84bad8815 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 5 Oct 2023 12:21:59 +0000 Subject: [PATCH 067/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bdf117e..f9e2313 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.0", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", From 7190bf9665e841f62b445ed132bca041076725fb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 6 Oct 2023 16:04:16 +0000 Subject: [PATCH 068/126] Remove files --- index.d.ts | 1562 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7744 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 6b364cc..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1562 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 79ca863..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.0-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.0-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.0-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.0-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.0-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.0-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.0-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.0-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.0-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.0-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.0-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.0-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2ee50b0..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7d65798da5cd1bdd3ee542062b81f45c2f474cce Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 6 Oct 2023 16:07:57 +0000 Subject: [PATCH 069/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6236 insertions(+), 3844 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 bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 46b615c..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: '0 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..e3d4cf9 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f9e2313..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.1", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.1", - "@stdlib/utils-async-do-while": "^0.1.1", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.1", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.1", - "@stdlib/utils-async-if-then": "^0.1.1", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.1", - "@stdlib/utils-async-try-then": "^0.1.1", - "@stdlib/utils-async-until": "^0.1.1", - "@stdlib/utils-async-while": "^0.1.1", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^0.1.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" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a5924ce --- /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 47e82b4..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 async utilities', 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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e1871fdb6738617e6c3859423673347a4387e56e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Nov 2023 08:46:24 +0000 Subject: [PATCH 070/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77ac66a..d2f8208 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", From fc6ff6a90c003751108938ab51ea77093caf5422 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Nov 2023 15:19:42 +0000 Subject: [PATCH 071/126] Remove files --- index.d.ts | 1562 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7744 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 6b364cc..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1562 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e3d4cf9..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a5924ce..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6f33f6e844d996cbc5f2e2e7b4c0b6a06cea75f4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Nov 2023 15:22:47 +0000 Subject: [PATCH 072/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6236 insertions(+), 3846 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 1ab77c7..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-11-01T03:13:58.448Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 46b615c..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: '0 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..e3d4cf9 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d2f8208..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.1", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.1", - "@stdlib/utils-async-do-while": "^0.1.1", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.1", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.1", - "@stdlib/utils-async-if-then": "^0.1.1", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.1", - "@stdlib/utils-async-try-then": "^0.1.1", - "@stdlib/utils-async-until": "^0.1.1", - "@stdlib/utils-async-while": "^0.1.1", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^0.1.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" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..ceab218 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 582529a96a1ea7ce9044be75c3136a4e5b975346 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 21:27:46 +0000 Subject: [PATCH 073/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77ac66a..d2f8208 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", From 6887aec02f0f5e5770cc1f54e02449e0200af97b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Nov 2023 00:23:05 +0000 Subject: [PATCH 074/126] Remove files --- index.d.ts | 1562 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7744 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 6b364cc..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1562 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e3d4cf9..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ceab218..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a3348a38cca53d5ee19a89ffe2f032cf0a8d3781 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Nov 2023 00:27:11 +0000 Subject: [PATCH 075/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6236 insertions(+), 3845 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 bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 46b615c..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: '0 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..e3d4cf9 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d2f8208..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.1", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.1", - "@stdlib/utils-async-do-while": "^0.1.1", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.1", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.1", - "@stdlib/utils-async-if-then": "^0.1.1", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.1", - "@stdlib/utils-async-try-then": "^0.1.1", - "@stdlib/utils-async-until": "^0.1.1", - "@stdlib/utils-async-while": "^0.1.1", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^0.1.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" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..f090e42 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 431de66d7e2f3e392c52ae60e11cd14918a9d747 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Dec 2023 07:31:55 +0000 Subject: [PATCH 076/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 59cb591..c93caed 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", From ed1ee27c2f6779b2a37cf2d5b1d18dfcfc12c864 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 03:00:00 +0000 Subject: [PATCH 077/126] Remove files --- index.d.ts | 1561 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7743 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 0624a22..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e3d4cf9..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index f090e42..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From cc28a8abd6c189654dc71e53baaaa227bc97f14e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 03:02:50 +0000 Subject: [PATCH 078/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6236 insertions(+), 3841 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 25f3e6c..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-12-01T03:24:23.433Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 46b615c..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: '0 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..e3d4cf9 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index c93caed..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.1", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.1", - "@stdlib/utils-async-do-while": "^0.1.1", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.1", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.1", - "@stdlib/utils-async-if-then": "^0.1.1", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.1", - "@stdlib/utils-async-try-then": "^0.1.1", - "@stdlib/utils-async-until": "^0.1.1", - "@stdlib/utils-async-while": "^0.1.1", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/bench": "^0.2.1", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^0.1.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" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2a023d0 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1d2f832448556b0d308749ce7612b5dcbd807100 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 04:47:32 +0000 Subject: [PATCH 079/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d0daad4..4fdac70 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", From 9bb4dfd591b0a14e964815397bd25ce197c5f569 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 11:07:54 +0000 Subject: [PATCH 080/126] Remove files --- index.d.ts | 1561 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7743 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 0624a22..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e3d4cf9..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2a023d0..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 3f1f3b050eb5781fd1886531b2be159baefb156f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 11:08:47 +0000 Subject: [PATCH 081/126] 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 | 105 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6236 insertions(+), 3847 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 584a9e4..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-01-01T02:56:48.926Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 7899a00..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: '0 12 * * 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 + + ```
@@ -151,7 +150,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,69 +212,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 f211de2..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[esm-url]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..2c6c801 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4fdac70..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.1", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.1", - "@stdlib/utils-async-do-while": "^0.1.1", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.1", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.1", - "@stdlib/utils-async-if-then": "^0.1.1", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.1", - "@stdlib/utils-async-try-then": "^0.1.1", - "@stdlib/utils-async-until": "^0.1.1", - "@stdlib/utils-async-while": "^0.1.1", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^0.1.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.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7391e13 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 598fb6f59e826f07a01c9184792419ea2767351a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 05:16:52 +0000 Subject: [PATCH 082/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d0daad4..4fdac70 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", From a185e0f4d8be6f86298febbb108bcb18e013883a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 10:38:07 +0000 Subject: [PATCH 083/126] Remove files --- index.d.ts | 1561 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7743 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 0624a22..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( `fs` ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( `@stdlib/fs/read-file` ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( `@stdlib/random/base/randu` ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 2c6c801..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7391e13..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From fcaa964ae4a5a7eb28f80c8f4dafa556f1efb377 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 10:38:54 +0000 Subject: [PATCH 084/126] 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 | 107 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6236 insertions(+), 3852 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 a14c7ed..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-02-01T03:32:58.217Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 7899a00..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..2c6c801 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..1cdefd8 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4fdac70..f6e70b6 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.1.0", - "@stdlib/utils-async-any-by-right": "^0.1.0", - "@stdlib/utils-async-bifurcate-by": "^0.1.0", - "@stdlib/utils-async-compose": "^0.1.1", - "@stdlib/utils-async-count-by": "^0.1.0", - "@stdlib/utils-async-do-until": "^0.1.1", - "@stdlib/utils-async-do-while": "^0.1.1", - "@stdlib/utils-async-every-by": "^0.1.0", - "@stdlib/utils-async-every-by-right": "^0.1.0", - "@stdlib/utils-async-for-each": "^0.1.0", - "@stdlib/utils-async-for-each-right": "^0.1.0", - "@stdlib/utils-async-function-sequence": "^0.1.1", - "@stdlib/utils-async-group-by": "^0.1.0", - "@stdlib/utils-async-if-else": "^0.1.1", - "@stdlib/utils-async-if-then": "^0.1.1", - "@stdlib/utils-async-inmap": "^0.1.0", - "@stdlib/utils-async-inmap-right": "^0.1.0", - "@stdlib/utils-async-map-function": "^0.1.0", - "@stdlib/utils-async-map-keys": "^0.1.0", - "@stdlib/utils-async-map-values": "^0.1.0", - "@stdlib/utils-async-none-by": "^0.1.0", - "@stdlib/utils-async-none-by-right": "^0.1.0", - "@stdlib/utils-async-reduce": "^0.1.0", - "@stdlib/utils-async-reduce-right": "^0.1.0", - "@stdlib/utils-async-series-waterfall": "^0.1.0", - "@stdlib/utils-async-some-by": "^0.1.0", - "@stdlib/utils-async-some-by-right": "^0.1.0", - "@stdlib/utils-async-tabulate-by": "^0.1.0", - "@stdlib/utils-async-try-catch": "^0.1.1", - "@stdlib/utils-async-try-then": "^0.1.1", - "@stdlib/utils-async-until": "^0.1.1", - "@stdlib/utils-async-while": "^0.1.1", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.1.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^0.1.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.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..cf43797 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 4e6b2e325ecfa7a46a6059a700fb05e5a7d2fb86 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 09:27:34 +0000 Subject: [PATCH 085/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 435200f..12c84e1 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.1.1", "@stdlib/math-base-special-ceil": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/string-format": "^0.2.0", + "@stdlib/error-tools-fmtprodmsg": "^0.2.0", "@stdlib/string-repeat": "^0.1.0", "@stdlib/string-replace": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", From da9d191bb700a1fadad80298a5acf8e31f962769 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 18:12:41 +0000 Subject: [PATCH 086/126] Remove files --- index.d.ts | 1561 ------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7743 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 2c6c801..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.1.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.1.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.1.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.1.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.1.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.1.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.1.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 1cdefd8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;w0NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index cf43797..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 211d629de7cf154c18e41d3f3e19a15ebaa576f0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 18:13:46 +0000 Subject: [PATCH 087/126] 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 | 107 +- 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 | 330 -- package.json | 105 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6236 insertions(+), 3855 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 bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 d1b697a..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..eff61f9 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.0-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.0-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.0-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.0-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.0-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.0-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.1.0-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.1.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.1.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.1.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.1.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.1.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.1.0-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.1.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.0-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.0-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.0-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.0-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.0-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.0-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.0-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.0-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 12c84e1..4ebf510 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.2.0", - "@stdlib/utils-async-any-by-right": "^0.2.0", - "@stdlib/utils-async-bifurcate-by": "^0.2.0", - "@stdlib/utils-async-compose": "^0.2.0", - "@stdlib/utils-async-count-by": "^0.2.0", - "@stdlib/utils-async-do-until": "^0.2.0", - "@stdlib/utils-async-do-while": "^0.2.0", - "@stdlib/utils-async-every-by": "^0.2.0", - "@stdlib/utils-async-every-by-right": "^0.2.0", - "@stdlib/utils-async-for-each": "^0.2.0", - "@stdlib/utils-async-for-each-right": "^0.2.0", - "@stdlib/utils-async-function-sequence": "^0.2.0", - "@stdlib/utils-async-group-by": "^0.2.0", - "@stdlib/utils-async-if-else": "^0.2.0", - "@stdlib/utils-async-if-then": "^0.2.0", - "@stdlib/utils-async-inmap": "^0.2.0", - "@stdlib/utils-async-inmap-right": "^0.2.0", - "@stdlib/utils-async-map-function": "^0.2.0", - "@stdlib/utils-async-map-keys": "^0.2.0", - "@stdlib/utils-async-map-values": "^0.2.0", - "@stdlib/utils-async-none-by": "^0.2.0", - "@stdlib/utils-async-none-by-right": "^0.2.0", - "@stdlib/utils-async-reduce": "^0.2.0", - "@stdlib/utils-async-reduce-right": "^0.2.0", - "@stdlib/utils-async-series-waterfall": "^0.2.0", - "@stdlib/utils-async-some-by": "^0.2.0", - "@stdlib/utils-async-some-by-right": "^0.2.0", - "@stdlib/utils-async-tabulate-by": "^0.2.0", - "@stdlib/utils-async-try-catch": "^0.2.0", - "@stdlib/utils-async-try-then": "^0.2.0", - "@stdlib/utils-async-until": "^0.2.0", - "@stdlib/utils-async-while": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-array": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-function-array": "^0.2.0", - "@stdlib/assert-is-nan": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-positive-integer": "^0.1.0", - "@stdlib/constants-float64-eps": "^0.1.1", - "@stdlib/constants-float64-pinf": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/math-base-assert-is-nan": "^0.1.1", - "@stdlib/math-base-special-ceil": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.0", - "@stdlib/string-repeat": "^0.1.0", - "@stdlib/string-replace": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", - "@stdlib/utils-index-of": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..acc82e0 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 44c703344604e8f5f2623c93e0b8e95b9f505b60 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 21:24:22 +0000 Subject: [PATCH 088/126] 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 454b120..47a911c 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/utils-async@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.2.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@esm/index.mjs'; +import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.2.0-esm/index.mjs'; ``` #### ns @@ -120,7 +120,7 @@ var o = ns; - - - - From c07b8b769f237d8507b3b0afb579c18c430b8f28 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 24 Feb 2024 18:47:19 +0000 Subject: [PATCH 092/126] 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 | 107 +- 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 | 330 -- package.json | 105 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4901 insertions(+), 3849 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 bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..489fc75 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.0-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.0-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.0-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.0-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.0-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.0-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.0-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.0-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.0-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.0-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.0-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.0-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.0-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.0-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.0-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.0-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.0-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.0-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.0-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.0-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.0-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 7657f55..6a0cef7 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.2.1", - "@stdlib/utils-async-any-by-right": "^0.2.1", - "@stdlib/utils-async-bifurcate-by": "^0.2.1", - "@stdlib/utils-async-compose": "^0.2.1", - "@stdlib/utils-async-count-by": "^0.2.1", - "@stdlib/utils-async-do-until": "^0.2.1", - "@stdlib/utils-async-do-while": "^0.2.1", - "@stdlib/utils-async-every-by": "^0.2.1", - "@stdlib/utils-async-every-by-right": "^0.2.1", - "@stdlib/utils-async-for-each": "^0.2.1", - "@stdlib/utils-async-for-each-right": "^0.2.1", - "@stdlib/utils-async-function-sequence": "^0.2.1", - "@stdlib/utils-async-group-by": "^0.2.1", - "@stdlib/utils-async-if-else": "^0.2.1", - "@stdlib/utils-async-if-then": "^0.2.1", - "@stdlib/utils-async-inmap": "^0.2.1", - "@stdlib/utils-async-inmap-right": "^0.2.1", - "@stdlib/utils-async-map-function": "^0.2.1", - "@stdlib/utils-async-map-keys": "^0.2.1", - "@stdlib/utils-async-map-values": "^0.2.1", - "@stdlib/utils-async-none-by": "^0.2.1", - "@stdlib/utils-async-none-by-right": "^0.2.1", - "@stdlib/utils-async-reduce": "^0.2.1", - "@stdlib/utils-async-reduce-right": "^0.2.1", - "@stdlib/utils-async-series-waterfall": "^0.2.1", - "@stdlib/utils-async-some-by": "^0.2.1", - "@stdlib/utils-async-some-by-right": "^0.2.1", - "@stdlib/utils-async-tabulate-by": "^0.2.1", - "@stdlib/utils-async-try-catch": "^0.2.1", - "@stdlib/utils-async-try-then": "^0.2.1", - "@stdlib/utils-async-until": "^0.2.1", - "@stdlib/utils-async-while": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-function-array": "^0.2.1", - "@stdlib/assert-is-nan": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.0", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-positive-integer": "^0.2.1", - "@stdlib/constants-float64-eps": "^0.2.1", - "@stdlib/constants-float64-pinf": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/math-base-assert-is-nan": "^0.2.1", - "@stdlib/math-base-special-ceil": "^0.2.0", - "@stdlib/random-base-randu": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/string-repeat": "^0.2.1", - "@stdlib/string-replace": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-index-of": "^0.2.0", - "@stdlib/utils-keys": "^0.2.0", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7051364 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0582e415c3edeb8ee0bf3b0592527b6934bc9f5b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 24 Feb 2024 19:16:15 +0000 Subject: [PATCH 093/126] 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 726085b..c11a63c 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/utils-async@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.2.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@esm/index.mjs'; +import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.2.1-esm/index.mjs'; ``` #### ns @@ -120,7 +120,7 @@ var o = ns; - - - - From 160909a8adb62a7e7f6922ae0dc40ee6eb652f3c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 09:23:47 +0000 Subject: [PATCH 097/126] 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 | 107 +- 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 | 330 -- package.json | 105 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 3851 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 7e99fd1..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-03-01T03:27:51.622Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..7228dc1 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 14747bf..6a0cef7 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.2.1", - "@stdlib/utils-async-any-by-right": "^0.2.1", - "@stdlib/utils-async-bifurcate-by": "^0.2.1", - "@stdlib/utils-async-compose": "^0.2.1", - "@stdlib/utils-async-count-by": "^0.2.1", - "@stdlib/utils-async-do-until": "^0.2.1", - "@stdlib/utils-async-do-while": "^0.2.1", - "@stdlib/utils-async-every-by": "^0.2.1", - "@stdlib/utils-async-every-by-right": "^0.2.1", - "@stdlib/utils-async-for-each": "^0.2.1", - "@stdlib/utils-async-for-each-right": "^0.2.1", - "@stdlib/utils-async-function-sequence": "^0.2.1", - "@stdlib/utils-async-group-by": "^0.2.1", - "@stdlib/utils-async-if-else": "^0.2.1", - "@stdlib/utils-async-if-then": "^0.2.1", - "@stdlib/utils-async-inmap": "^0.2.1", - "@stdlib/utils-async-inmap-right": "^0.2.1", - "@stdlib/utils-async-map-function": "^0.2.1", - "@stdlib/utils-async-map-keys": "^0.2.1", - "@stdlib/utils-async-map-values": "^0.2.1", - "@stdlib/utils-async-none-by": "^0.2.1", - "@stdlib/utils-async-none-by-right": "^0.2.1", - "@stdlib/utils-async-reduce": "^0.2.1", - "@stdlib/utils-async-reduce-right": "^0.2.1", - "@stdlib/utils-async-series-waterfall": "^0.2.1", - "@stdlib/utils-async-some-by": "^0.2.1", - "@stdlib/utils-async-some-by-right": "^0.2.1", - "@stdlib/utils-async-tabulate-by": "^0.2.1", - "@stdlib/utils-async-try-catch": "^0.2.1", - "@stdlib/utils-async-try-then": "^0.2.1", - "@stdlib/utils-async-until": "^0.2.1", - "@stdlib/utils-async-while": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-function-array": "^0.2.1", - "@stdlib/assert-is-nan": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-positive-integer": "^0.2.1", - "@stdlib/constants-float64-eps": "^0.2.1", - "@stdlib/constants-float64-pinf": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/math-base-assert-is-nan": "^0.2.1", - "@stdlib/math-base-special-ceil": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/string-repeat": "^0.2.1", - "@stdlib/string-replace": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-index-of": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6eada73 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c7e445d7c4082c88a3cf7872b61a21b18a060a98 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 04:15:45 +0000 Subject: [PATCH 098/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9517ce1..14747bf 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.1", "@stdlib/math-base-special-ceil": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/string-repeat": "^0.2.1", "@stdlib/string-replace": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", From 6a9009ab7b9d8a56218ca4097fbfe85589f68a93 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 08:54:48 +0000 Subject: [PATCH 099/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7228dc1..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6eada73..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 5e75271a4ab723a115a7552b24858de61dde289c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 08:55:13 +0000 Subject: [PATCH 100/126] 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 | 107 +- 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 | 330 -- package.json | 105 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 3854 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 7debb9d..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-04-01T02:50:49.939Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..7228dc1 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 14747bf..6a0cef7 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.2.1", - "@stdlib/utils-async-any-by-right": "^0.2.1", - "@stdlib/utils-async-bifurcate-by": "^0.2.1", - "@stdlib/utils-async-compose": "^0.2.1", - "@stdlib/utils-async-count-by": "^0.2.1", - "@stdlib/utils-async-do-until": "^0.2.1", - "@stdlib/utils-async-do-while": "^0.2.1", - "@stdlib/utils-async-every-by": "^0.2.1", - "@stdlib/utils-async-every-by-right": "^0.2.1", - "@stdlib/utils-async-for-each": "^0.2.1", - "@stdlib/utils-async-for-each-right": "^0.2.1", - "@stdlib/utils-async-function-sequence": "^0.2.1", - "@stdlib/utils-async-group-by": "^0.2.1", - "@stdlib/utils-async-if-else": "^0.2.1", - "@stdlib/utils-async-if-then": "^0.2.1", - "@stdlib/utils-async-inmap": "^0.2.1", - "@stdlib/utils-async-inmap-right": "^0.2.1", - "@stdlib/utils-async-map-function": "^0.2.1", - "@stdlib/utils-async-map-keys": "^0.2.1", - "@stdlib/utils-async-map-values": "^0.2.1", - "@stdlib/utils-async-none-by": "^0.2.1", - "@stdlib/utils-async-none-by-right": "^0.2.1", - "@stdlib/utils-async-reduce": "^0.2.1", - "@stdlib/utils-async-reduce-right": "^0.2.1", - "@stdlib/utils-async-series-waterfall": "^0.2.1", - "@stdlib/utils-async-some-by": "^0.2.1", - "@stdlib/utils-async-some-by-right": "^0.2.1", - "@stdlib/utils-async-tabulate-by": "^0.2.1", - "@stdlib/utils-async-try-catch": "^0.2.1", - "@stdlib/utils-async-try-then": "^0.2.1", - "@stdlib/utils-async-until": "^0.2.1", - "@stdlib/utils-async-while": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-function-array": "^0.2.1", - "@stdlib/assert-is-nan": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-positive-integer": "^0.2.1", - "@stdlib/constants-float64-eps": "^0.2.1", - "@stdlib/constants-float64-pinf": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/math-base-assert-is-nan": "^0.2.1", - "@stdlib/math-base-special-ceil": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/string-repeat": "^0.2.1", - "@stdlib/string-replace": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-index-of": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6eada73 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 58cc9171fd0fc2613bebc8b0c43f393e6fd701ba Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 00:26:51 +0000 Subject: [PATCH 101/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9517ce1..14747bf 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.1", "@stdlib/math-base-special-ceil": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/string-repeat": "^0.2.1", "@stdlib/string-replace": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", From 0392069a355e33651abb45f1445f2bc1640339f6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 05:36:02 +0000 Subject: [PATCH 102/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7228dc1..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6eada73..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From aaaa026f6e90a5f7081245c40ca562ee9d60f396 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 05:36:37 +0000 Subject: [PATCH 103/126] 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 | 107 +- 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 | 330 -- package.json | 105 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4901 insertions(+), 3855 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 bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..7228dc1 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 14747bf..6a0cef7 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Standard async 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,85 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/utils-async-any-by": "^0.2.1", - "@stdlib/utils-async-any-by-right": "^0.2.1", - "@stdlib/utils-async-bifurcate-by": "^0.2.1", - "@stdlib/utils-async-compose": "^0.2.1", - "@stdlib/utils-async-count-by": "^0.2.1", - "@stdlib/utils-async-do-until": "^0.2.1", - "@stdlib/utils-async-do-while": "^0.2.1", - "@stdlib/utils-async-every-by": "^0.2.1", - "@stdlib/utils-async-every-by-right": "^0.2.1", - "@stdlib/utils-async-for-each": "^0.2.1", - "@stdlib/utils-async-for-each-right": "^0.2.1", - "@stdlib/utils-async-function-sequence": "^0.2.1", - "@stdlib/utils-async-group-by": "^0.2.1", - "@stdlib/utils-async-if-else": "^0.2.1", - "@stdlib/utils-async-if-then": "^0.2.1", - "@stdlib/utils-async-inmap": "^0.2.1", - "@stdlib/utils-async-inmap-right": "^0.2.1", - "@stdlib/utils-async-map-function": "^0.2.1", - "@stdlib/utils-async-map-keys": "^0.2.1", - "@stdlib/utils-async-map-values": "^0.2.1", - "@stdlib/utils-async-none-by": "^0.2.1", - "@stdlib/utils-async-none-by-right": "^0.2.1", - "@stdlib/utils-async-reduce": "^0.2.1", - "@stdlib/utils-async-reduce-right": "^0.2.1", - "@stdlib/utils-async-series-waterfall": "^0.2.1", - "@stdlib/utils-async-some-by": "^0.2.1", - "@stdlib/utils-async-some-by-right": "^0.2.1", - "@stdlib/utils-async-tabulate-by": "^0.2.1", - "@stdlib/utils-async-try-catch": "^0.2.1", - "@stdlib/utils-async-try-then": "^0.2.1", - "@stdlib/utils-async-until": "^0.2.1", - "@stdlib/utils-async-while": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-array": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-function-array": "^0.2.1", - "@stdlib/assert-is-nan": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-positive-integer": "^0.2.1", - "@stdlib/constants-float64-eps": "^0.2.1", - "@stdlib/constants-float64-pinf": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/math-base-assert-is-nan": "^0.2.1", - "@stdlib/math-base-special-ceil": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/string-repeat": "^0.2.1", - "@stdlib/string-replace": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-index-of": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6eada73 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 22ff46c84a296f7540bf87a04e5116e48ee6a20f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:47:37 +0000 Subject: [PATCH 104/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fb2725..0048f0b 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.2", "@stdlib/math-base-special-ceil": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-repeat": "^0.2.2", "@stdlib/string-replace": "^0.2.2", "@stdlib/utils-async-parallel": "^0.1.0", From edbe30af25b6ac26d3e8d589450e15988d4fd55e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:49:56 +0000 Subject: [PATCH 105/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7228dc1..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.1-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.1-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.1-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.1-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.1-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.1-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.1-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.1-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.1-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6eada73..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 368359d2dd04aa8c0c3dad364011cacf237f67c2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:50:12 +0000 Subject: [PATCH 106/126] 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 | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 2196 ---------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4901 insertions(+), 6058 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 bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..5cc4a1a --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 0048f0b..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..9427a30 --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1af1a21044dbe4bb840e86b195934de300ddb40a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:51:06 +0000 Subject: [PATCH 107/126] 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 c0fac83..fa05171 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/utils-async@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.3.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@esm/index.mjs'; +import { anyByAsync, anyByRightAsync, bifurcateByAsync, composeAsync, countByAsync, doUntilAsync, doWhileAsync, everyByAsync, everyByRightAsync, forEachAsync, forEachRightAsync, functionSequenceAsync, groupByAsync, ifelseAsync, ifthenAsync, inmapAsync, inmapRightAsync, mapFunAsync, mapKeysAsync, mapValuesAsync, noneByAsync, noneByRightAsync, reduceAsync, reduceRightAsync, someByAsync, someByRightAsync, tabulateByAsync, trycatchAsync, trythenAsync, untilAsync, waterfall, whileAsync } from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-async@v0.3.0-esm/index.mjs'; ``` #### ns @@ -120,7 +120,7 @@ var o = ns; - - - - From ac26523fb8f2b9c6ba08a105d05915987dd7fe29 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Aug 2024 09:02:44 +0000 Subject: [PATCH 111/126] 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 | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 4153 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 fd6a106..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-08-01T03:28:13.204Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..efa6da6 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2aeda6f..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3b1f55d --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 26fe23e48fba2dc200ee7273f542b3543789dc34 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 3 Aug 2024 19:45:03 +0000 Subject: [PATCH 112/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22af941..2aeda6f 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.2", "@stdlib/math-base-special-ceil": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-repeat": "^0.2.2", "@stdlib/string-replace": "^0.2.2", "@stdlib/utils-async-parallel": "^0.1.0", From 249d984fb3db22b06a4c971d8355628f26208a20 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 3 Aug 2024 23:00:51 +0000 Subject: [PATCH 113/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index efa6da6..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3b1f55d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8d248c86907307a88b198f2c114658a951016cf2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 3 Aug 2024 23:01:24 +0000 Subject: [PATCH 114/126] 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 | 2218 ---------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 6083 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 9cb1ddd..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-08-03T18:39:42.587Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..efa6da6 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2aeda6f..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3b1f55d --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b063ba0fde71c33d608cb5b9257929ea4553bb69 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 04:58:12 +0000 Subject: [PATCH 115/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22af941..2aeda6f 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.2", "@stdlib/math-base-special-ceil": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-repeat": "^0.2.2", "@stdlib/string-replace": "^0.2.2", "@stdlib/utils-async-parallel": "^0.1.0", From 1626191ca2247e4e827d836ba331e4e40574d45b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 08:57:55 +0000 Subject: [PATCH 116/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index efa6da6..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3b1f55d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 1f0edf9f0ffb1fb25f93d22722c135c1ef6a6c86 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 08:58:26 +0000 Subject: [PATCH 117/126] 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 | 1691 ------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 5556 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 4db57b7..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-09-01T03:41:05.969Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..efa6da6 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2aeda6f..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3b1f55d --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ee75fdd365befb4d6c350956eb9019fd99277ff0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Oct 2024 05:07:24 +0000 Subject: [PATCH 118/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22af941..2aeda6f 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.2", "@stdlib/math-base-special-ceil": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-repeat": "^0.2.2", "@stdlib/string-replace": "^0.2.2", "@stdlib/utils-async-parallel": "^0.1.0", From 6f8ff7a8124ed2d402f28a62fbbb4c681ce1fe23 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Oct 2024 09:12:55 +0000 Subject: [PATCH 119/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index efa6da6..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3b1f55d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9704b115404ba483b0df031562b2218530a2dc04 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Oct 2024 09:13:34 +0000 Subject: [PATCH 120/126] 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 | 1729 -------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 5594 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 70ebbfd..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T03:51:03.593Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..efa6da6 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2aeda6f..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3b1f55d --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 68dfa261b5fac295d49fb7a209b5359141ffa69b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Nov 2024 05:02:39 +0000 Subject: [PATCH 121/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22af941..2aeda6f 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.2", "@stdlib/math-base-special-ceil": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-repeat": "^0.2.2", "@stdlib/string-replace": "^0.2.2", "@stdlib/utils-async-parallel": "^0.1.0", From 71ebe1382b9b95f8ee555d0f62831459026a9ff2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Nov 2024 08:35:36 +0000 Subject: [PATCH 122/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index efa6da6..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3b1f55d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 172e6bbe31ff448b92f3642e32a6e952ffb3f522 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Nov 2024 08:36:11 +0000 Subject: [PATCH 123/126] 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 | 1729 -------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4901 insertions(+), 5594 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 61fc204..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-11-01T03:54:31.920Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..efa6da6 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2aeda6f..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3b1f55d --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b1079b1c906c2abd1acea14dc8beefa65be2e80d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 05:18:21 +0000 Subject: [PATCH 124/126] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22af941..2aeda6f 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@stdlib/math-base-assert-is-nan": "^0.2.2", "@stdlib/math-base-special-ceil": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/string-repeat": "^0.2.2", "@stdlib/string-replace": "^0.2.2", "@stdlib/utils-async-parallel": "^0.1.0", From 4f2bfcdd59d36ffa5f9775854b8cb8ce4b27f113 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 09:07:00 +0000 Subject: [PATCH 125/126] Remove files --- index.d.ts | 1561 ---------------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 6408 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 aed7d43..0000000 --- a/index.d.ts +++ /dev/null @@ -1,1561 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 anyByAsync = require( '@stdlib/utils-async-any-by' ); -import anyByRightAsync = require( '@stdlib/utils-async-any-by-right' ); -import bifurcateByAsync = require( '@stdlib/utils-async-bifurcate-by' ); -import composeAsync = require( '@stdlib/utils-async-compose' ); -import countByAsync = require( '@stdlib/utils-async-count-by' ); -import doUntilAsync = require( '@stdlib/utils-async-do-until' ); -import doWhileAsync = require( '@stdlib/utils-async-do-while' ); -import everyByAsync = require( '@stdlib/utils-async-every-by' ); -import everyByRightAsync = require( '@stdlib/utils-async-every-by-right' ); -import forEachAsync = require( '@stdlib/utils-async-for-each' ); -import forEachRightAsync = require( '@stdlib/utils-async-for-each-right' ); -import functionSequenceAsync = require( '@stdlib/utils-async-function-sequence' ); -import groupByAsync = require( '@stdlib/utils-async-group-by' ); -import ifelseAsync = require( '@stdlib/utils-async-if-else' ); -import ifthenAsync = require( '@stdlib/utils-async-if-then' ); -import inmapAsync = require( '@stdlib/utils-async-inmap' ); -import inmapRightAsync = require( '@stdlib/utils-async-inmap-right' ); -import mapFunAsync = require( '@stdlib/utils-async-map-function' ); -import mapKeysAsync = require( '@stdlib/utils-async-map-keys' ); -import mapValuesAsync = require( '@stdlib/utils-async-map-values' ); -import noneByAsync = require( '@stdlib/utils-async-none-by' ); -import noneByRightAsync = require( '@stdlib/utils-async-none-by-right' ); -import reduceAsync = require( '@stdlib/utils-async-reduce' ); -import reduceRightAsync = require( '@stdlib/utils-async-reduce-right' ); -import waterfall = require( '@stdlib/utils-async-series-waterfall' ); -import someByAsync = require( '@stdlib/utils-async-some-by' ); -import someByRightAsync = require( '@stdlib/utils-async-some-by-right' ); -import tabulateByAsync = require( '@stdlib/utils-async-tabulate-by' ); -import trycatchAsync = require( '@stdlib/utils-async-try-catch' ); -import trythenAsync = require( '@stdlib/utils-async-try-then' ); -import untilAsync = require( '@stdlib/utils-async-until' ); -import whileAsync = require( '@stdlib/utils-async-while' ); - -/** -* Interface describing the `async` namespace. -*/ -interface Namespace { - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByAsync( files, predicate, done ); - */ - anyByAsync: typeof anyByAsync; - - /** - * Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read at least one file.' ); - * } else { - * console.log( 'Unable to read any files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.anyByRightAsync( files, predicate, done ); - */ - anyByRightAsync: typeof anyByRightAsync; - - /** - * Splits values into two groups according to a predicate function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param predicate - predicate function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.bifurcateByAsync( files, predicate, done ); - */ - bifurcateByAsync: typeof bifurcateByAsync; - - /** - * Function composition. - * - * ## Notes - * - * - Returns a composite function. Starting from the right, the composite function evaluates each function and passes the result as the first argument of the next function. The result of the leftmost function is the result of the whole. - * - * @param f0 - first function to compose - * @param f1 - second function to compose - * @param f - remaining functions to compose - * @returns composite function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.composeAsync( c, b, a ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - composeAsync: typeof composeAsync; - - /** - * Groups values according to an indicator function and returns group counts. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.countByAsync( files, indicator, done ); - */ - countByAsync: typeof countByAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doUntilAsync( fcn, predicate, done ); - */ - doUntilAsync: typeof doUntilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param fcn - function to invoke - * @param predicate - function which indicates whether to continue invoking a function - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.doWhileAsync( fcn, predicate, done ); - */ - doWhileAsync: typeof doWhileAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByAsync( files, predicate, done ); - */ - everyByAsync: typeof everyByAsync; - - /** - * Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read all files.' ); - * } else { - * console.log( 'Was unable to read all files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.everyByRightAsync( files, predicate, done ); - */ - everyByRightAsync: typeof everyByRightAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachAsync( files, read, done ); - */ - forEachAsync: typeof forEachAsync; - - /** - * Invokes a function once for each element in a collection. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * console.log( 'Successfully read all files.' ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( error ); - * } - * console.log( 'Successfully read file: %s', file ); - * next(); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.forEachRightAsync( files, read, done ); - */ - forEachRightAsync: typeof forEachRightAsync; - - /** - * Function sequence. - * - * @param f0 - first function to evaluate - * @param f1 - second function to evaluate - * @param f - remaining functions to evaluate in sequential order - * @returns pipeline function - * - * @example - * function a( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, 2*x ); - * } - * } - * - * function b( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x+3 ); - * } - * } - * - * function c( x, next ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * next( null, x/5 ); - * } - * } - * - * var f = ns.functionSequenceAsync( a, b, c ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * // => 3 - * } - * - * f( 6, done ); - */ - functionSequenceAsync: typeof functionSequenceAsync; - - /** - * Groups values according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param options.returns - if `values`, values are returned; if `indices`, indices are returned; if `*`, both indices and values are returned (default: 'values') - * @param indicator - indicator function specifying which group an element in the input collection belongs to - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.groupByAsync( files, indicator, done ); - */ - groupByAsync: typeof groupByAsync; - - /** - * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. - * - * @param predicate - predicate function - * @param x - value to return if a condition is truthy - * @param y - value to return if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifelseAsync( predicate, 1.0, -1.0, done ); - */ - ifelseAsync: typeof ifelseAsync; - - /** - * If a predicate function returns a truthy value, invokes `x`; otherwise, invokes `y`. - * - * @param predicate - predicate function - * @param x - function to invoke if a condition is truthy - * @param y - function to invoke if a condition is falsy - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function predicate( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, randu() > 0.5 ); - * } - * } - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, 1.0 ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * ns.ifthenAsync( predicate, x, y, done ); - */ - ifthenAsync: typeof ifthenAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapAsync( files, read, done ); - */ - inmapAsync: typeof inmapAsync; - - /** - * Invokes a function once for each element in a collection and updates a collection in-place. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param fcn - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, results ) { - * if ( error ) { - * throw error; - * } - * console.log( results ); - * } - * - * function read( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.inmapRightAsync( files, read, done ); - */ - inmapRightAsync: typeof inmapRightAsync; - - /** - * Invokes a function `n` times and returns an array of accumulated function return values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - * @param fcn - function to invoke - * @param n - number of function invocations - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function again (default: false) - * @param done - callback to invoke upon invoking a function `n` times - * @throws second argument must be a nonnegative integer - * @throws must provide valid options - * - * @example - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * next( null, i ); - * } - * } - * - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( JSON.stringify( out ) ); - * // => [ 0, 1, 2, 3, 4 ] - * } - * - * ns.mapFunAsync( fcn, 5, done ); - */ - mapFunAsync: typeof mapFunAsync; - - /** - * Maps keys from one object to a new object having the same values. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function read( key, value, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( value, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, key+':unreadable' ); - * } - * next( null, key+':readable' ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapKeysAsync( files, opts, read, done ); - */ - mapKeysAsync: typeof mapKeysAsync; - - /** - * Maps values from one object to a new object having the same keys. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - Iteration and insertion order are **not** guaranteed. - * - The function only operates on own properties, not inherited properties. - * - * - * @param obj - source object - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next own property (default: false) - * @param transform - transform function - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var stat = require( 'fs' ).stat; - * - * function getStats( file, next ) { - * stat( file, onStats ); - * - * function onStats( error, data ) { - * if ( error ) { - * return next( error ); - * } - * next( null, data ); - * } - * } - * - * // Define a callback which handles errors: - * function done( error, out ) { - * if ( error ) { - * throw error; - * } - * console.log( out ); - * } - * - * // Create a dictionary of file names: - * var files = { - * 'file1': './beep.js', - * 'file2': './boop.js' - * }; - * - * var opts = { - * 'series': true - * }; - * - * // Process each file in `files`: - * ns.mapValuesAsync( files, opts, getStats, done ); - */ - mapValuesAsync: typeof mapValuesAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByAsync( files, predicate, done ); - */ - noneByAsync: typeof noneByAsync; - - /** - * Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Was unable to read all files.' ); - * } else { - * console.log( 'Was able to read at least one file.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.noneByRightAsync( files, predicate, done ); - */ - noneByRightAsync: typeof noneByRightAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceAsync( files, acc, read, done ); - */ - reduceAsync: typeof reduceAsync; - - /** - * Applies a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. - * - * ## Notes - * - * - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param initial - initial value - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: true) - * @param reducer - function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, acc ) { - * if ( error ) { - * throw error; - * } - * console.log( acc.count ); - * } - * - * function read( acc, file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, acc ); - * } - * acc.count += 1; - * next( null, acc ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * var acc = { - * 'count': 0 - * }; - * ns.reduceRightAsync( files, acc, read, done ); - */ - reduceRightAsync: typeof reduceRightAsync; - - /** - * Executes functions in series, passing the results of one function as arguments to the next function. - * - * @param fcns - array of functions - * @param clbk - callback to invoke upon completion - * @param thisArg - function context - * - * @example - * function foo( next ) { - * next( null, 'beep' ); - * } - * - * function bar( str, next ) { - * console.log( str ); - * // => 'beep' - * - * next(); - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * var fcns = [ foo, bar ]; - * - * ns.waterfall( fcns, done ); - */ - waterfall: typeof waterfall; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByAsync( files, 2, predicate, done ); - */ - someByAsync: typeof someByAsync; - - /** - * Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left. - * - * ## Notes - * - * - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * @param collection - input collection - * @param n - number of elements - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param predicate - predicate function to invoke for each element in a collection - * @param done - function to invoke upon completion - * @throws second argument must be a positive integer - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, bool ) { - * if ( error ) { - * throw error; - * } - * if ( bool ) { - * console.log( 'Successfully read some files.' ); - * } else { - * console.log( 'Unable to read some files.' ); - * } - * } - * - * function predicate( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, false ); - * } - * next( null, true ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.someByRightAsync( files, 2, predicate, done ); - */ - someByRightAsync: typeof someByRightAsync; - - /** - * Generates a frequency table according to an indicator function. - * - * ## Notes - * - * - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`). - * - * - The output frequency table is an array of arrays. Each sub-array corresponds to a unique value in the input collection and is structured as follows: - * - * - 0: unique value - * - 1: value count - * - 2: frequency percentage - * - * @param collection - input collection - * @param options - function options - * @param options.thisArg - execution context - * @param options.limit - maximum number of pending invocations at any one time - * @param options.series - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false) - * @param indicator - function whose return values are used to populate the output frequency table - * @param done - function to invoke upon completion - * @throws must provide valid options - * - * @example - * var readFile = require( '@stdlib/fs-read-file' ); - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * function indicator( file, next ) { - * var opts = { - * 'encoding': 'utf8' - * }; - * readFile( file, opts, onFile ); - * - * function onFile( error ) { - * if ( error ) { - * return next( null, 'nonreadable' ); - * } - * next( null, 'readable' ); - * } - * } - * - * var files = [ - * './beep.js', - * './boop.js' - * ]; - * - * ns.tabulateByAsync( files, indicator, done ); - */ - tabulateByAsync: typeof tabulateByAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a callback with a value `y`. - * - * @param x - function to invoke - * @param y - value to return if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * console.log( error.message ); - * } - * console.log( result ); - * } - * - * ns.trycatchAsync( x, -1.0, done ); - */ - trycatchAsync: typeof trycatchAsync; - - /** - * If a function does not return an error, invokes a callback with the function result; otherwise, invokes a second function `y`. - * - * @param x - function to invoke - * @param y - function to invoke if `x` returns an error - * @param done - callback to invoke upon completion - * - * @example - * var randu = require( '@stdlib/random-base-randu' ); - * - * function x( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * if ( randu() > 0.5 ) { - * return clbk( null, 1.0 ); - * } - * clbk( new Error( 'beep' ) ); - * } - * } - * - * function y( clbk ) { - * setTimeout( onTimeout, 0 ); - * function onTimeout() { - * clbk( null, -1.0 ); - * } - * } - * - * function done( error, result ) { - * if ( error ) { - * throw error; - * } - * console.log( result ); - * } - * - * ns.trythenAsync( x, y, done ); - */ - trythenAsync: typeof trythenAsync; - - /** - * Invokes a function until a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i >= 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.untilAsync( predicate, fcn, done ); - */ - untilAsync: typeof untilAsync; - - /** - * Invokes a function while a test condition is true. - * - * @param predicate - function which indicates whether to continue invoking a function - * @param fcn - function to invoke - * @param done - callback to invoke upon completion - * @param thisArg - execution context for the invoked function - * - * @example - * function predicate( i, clbk ) { - * clbk( null, i < 5 ); - * } - * - * function fcn( i, next ) { - * setTimeout( onTimeout, i ); - * function onTimeout() { - * console.log( 'beep: %d', i ); - * next(); - * } - * } - * - * function done( error ) { - * if ( error ) { - * throw error; - * } - * } - * - * ns.whileAsync( predicate, fcn, done ); - */ - whileAsync: typeof whileAsync; -} - -/** -* Standard async utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index efa6da6..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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index c5282a9..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3b1f55d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b4e63b884e2f9a9be57afbea884364a69ac926db Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 09:07:40 +0000 Subject: [PATCH 126/126] 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 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1729 ------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 107 +- 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 | 330 -- package.json | 106 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4901 insertions(+), 5699 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 .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/.keepalive b/.github/.keepalive deleted file mode 100644 index f54f645..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-12-01T03:59:26.910Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index bbd2e19..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/utils/async) 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 843c9f4..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/utils/async) 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 1fe38f1..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: '0 12 * * 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 + + ```
@@ -153,7 +150,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]. @@ -218,69 +215,69 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right +[@stdlib/utils/async/any-by-right]: https://github.com/stdlib-js/utils-async-any-by-right/tree/esm -[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by +[@stdlib/utils/async/any-by]: https://github.com/stdlib-js/utils-async-any-by/tree/esm -[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by +[@stdlib/utils/async/bifurcate-by]: https://github.com/stdlib-js/utils-async-bifurcate-by/tree/esm -[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose +[@stdlib/utils/async/compose]: https://github.com/stdlib-js/utils-async-compose/tree/esm -[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by +[@stdlib/utils/async/count-by]: https://github.com/stdlib-js/utils-async-count-by/tree/esm -[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until +[@stdlib/utils/async/do-until]: https://github.com/stdlib-js/utils-async-do-until/tree/esm -[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while +[@stdlib/utils/async/do-while]: https://github.com/stdlib-js/utils-async-do-while/tree/esm -[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right +[@stdlib/utils/async/every-by-right]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm -[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by +[@stdlib/utils/async/every-by]: https://github.com/stdlib-js/utils-async-every-by/tree/esm -[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right +[@stdlib/utils/async/for-each-right]: https://github.com/stdlib-js/utils-async-for-each-right/tree/esm -[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each +[@stdlib/utils/async/for-each]: https://github.com/stdlib-js/utils-async-for-each/tree/esm -[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence +[@stdlib/utils/async/function-sequence]: https://github.com/stdlib-js/utils-async-function-sequence/tree/esm -[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by +[@stdlib/utils/async/group-by]: https://github.com/stdlib-js/utils-async-group-by/tree/esm -[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else +[@stdlib/utils/async/if-else]: https://github.com/stdlib-js/utils-async-if-else/tree/esm -[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then +[@stdlib/utils/async/if-then]: https://github.com/stdlib-js/utils-async-if-then/tree/esm -[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right +[@stdlib/utils/async/inmap-right]: https://github.com/stdlib-js/utils-async-inmap-right/tree/esm -[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap +[@stdlib/utils/async/inmap]: https://github.com/stdlib-js/utils-async-inmap/tree/esm -[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function +[@stdlib/utils/async/map-function]: https://github.com/stdlib-js/utils-async-map-function/tree/esm -[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys +[@stdlib/utils/async/map-keys]: https://github.com/stdlib-js/utils-async-map-keys/tree/esm -[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values +[@stdlib/utils/async/map-values]: https://github.com/stdlib-js/utils-async-map-values/tree/esm -[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right +[@stdlib/utils/async/none-by-right]: https://github.com/stdlib-js/utils-async-none-by-right/tree/esm -[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by +[@stdlib/utils/async/none-by]: https://github.com/stdlib-js/utils-async-none-by/tree/esm -[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right +[@stdlib/utils/async/reduce-right]: https://github.com/stdlib-js/utils-async-reduce-right/tree/esm -[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce +[@stdlib/utils/async/reduce]: https://github.com/stdlib-js/utils-async-reduce/tree/esm -[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall +[@stdlib/utils/async/series-waterfall]: https://github.com/stdlib-js/utils-async-series-waterfall/tree/esm -[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right +[@stdlib/utils/async/some-by-right]: https://github.com/stdlib-js/utils-async-some-by-right/tree/esm -[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by +[@stdlib/utils/async/some-by]: https://github.com/stdlib-js/utils-async-some-by/tree/esm -[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by +[@stdlib/utils/async/tabulate-by]: https://github.com/stdlib-js/utils-async-tabulate-by/tree/esm -[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch +[@stdlib/utils/async/try-catch]: https://github.com/stdlib-js/utils-async-try-catch/tree/esm -[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then +[@stdlib/utils/async/try-then]: https://github.com/stdlib-js/utils-async-try-then/tree/esm -[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until +[@stdlib/utils/async/until]: https://github.com/stdlib-js/utils-async-until/tree/esm -[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while +[@stdlib/utils/async/while]: https://github.com/stdlib-js/utils-async-while/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 461efb0..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/utils/async" -%% click B href "https://github.com/stdlib-js/utils-async/tree/main" -%% click C href "https://github.com/stdlib-js/utils-async/tree/production" -%% click D href "https://github.com/stdlib-js/utils-async/tree/esm" -%% click E href "https://github.com/stdlib-js/utils-async/tree/deno" -%% click F href "https://github.com/stdlib-js/utils-async/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/utils/async -[production-url]: https://github.com/stdlib-js/utils-async/tree/production -[deno-url]: https://github.com/stdlib-js/utils-async/tree/deno -[deno-readme]: https://github.com/stdlib-js/utils-async/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/utils-async/tree/umd -[umd-readme]: https://github.com/stdlib-js/utils-async/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/utils-async/tree/esm -[esm-readme]: https://github.com/stdlib-js/utils-async/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 43a0829..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,"anyByAsync",require('@stdlib/utils-async-any-by/dist'));r(e,"anyByRightAsync",require('@stdlib/utils-async-any-by-right/dist'));r(e,"bifurcateByAsync",require('@stdlib/utils-async-bifurcate-by/dist'));r(e,"composeAsync",require('@stdlib/utils-async-compose/dist'));r(e,"countByAsync",require('@stdlib/utils-async-count-by/dist'));r(e,"doUntilAsync",require('@stdlib/utils-async-do-until/dist'));r(e,"doWhileAsync",require('@stdlib/utils-async-do-while/dist'));r(e,"everyByAsync",require('@stdlib/utils-async-every-by/dist'));r(e,"everyByRightAsync",require('@stdlib/utils-async-every-by-right/dist'));r(e,"forEachAsync",require('@stdlib/utils-async-for-each/dist'));r(e,"forEachRightAsync",require('@stdlib/utils-async-for-each-right/dist'));r(e,"functionSequenceAsync",require('@stdlib/utils-async-function-sequence/dist'));r(e,"groupByAsync",require('@stdlib/utils-async-group-by/dist'));r(e,"ifelseAsync",require('@stdlib/utils-async-if-else/dist'));r(e,"ifthenAsync",require('@stdlib/utils-async-if-then/dist'));r(e,"inmapAsync",require('@stdlib/utils-async-inmap/dist'));r(e,"inmapRightAsync",require('@stdlib/utils-async-inmap-right/dist'));r(e,"mapFunAsync",require('@stdlib/utils-async-map-function/dist'));r(e,"mapKeysAsync",require('@stdlib/utils-async-map-keys/dist'));r(e,"mapValuesAsync",require('@stdlib/utils-async-map-values/dist'));r(e,"noneByAsync",require('@stdlib/utils-async-none-by/dist'));r(e,"noneByRightAsync",require('@stdlib/utils-async-none-by-right/dist'));r(e,"reduceAsync",require('@stdlib/utils-async-reduce/dist'));r(e,"reduceRightAsync",require('@stdlib/utils-async-reduce-right/dist'));r(e,"waterfall",require('@stdlib/utils-async-series-waterfall/dist'));r(e,"someByAsync",require('@stdlib/utils-async-some-by/dist'));r(e,"someByRightAsync",require('@stdlib/utils-async-some-by-right/dist'));r(e,"tabulateByAsync",require('@stdlib/utils-async-tabulate-by/dist'));r(e,"trycatchAsync",require('@stdlib/utils-async-try-catch/dist'));r(e,"trythenAsync",require('@stdlib/utils-async-try-then/dist'));r(e,"untilAsync",require('@stdlib/utils-async-until/dist'));r(e,"whileAsync",require('@stdlib/utils-async-while/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 fbcd8e8..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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nsetReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nsetReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nsetReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nsetReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nsetReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nsetReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nsetReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nsetReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nsetReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nsetReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nsetReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nsetReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nsetReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nsetReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nsetReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nsetReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nsetReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nsetReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nsetReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nsetReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nsetReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nsetReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nsetReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nsetReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nsetReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nsetReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nsetReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nsetReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nsetReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nsetReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nsetReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nsetReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,aAAc,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAI,kBAAmB,QAAS,kCAAmC,CAAE,EASlFD,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,eAAgB,QAAS,6BAA8B,CAAE,EAS1ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,oBAAqB,QAAS,oCAAqC,CAAE,EAStFD,EAAaC,EAAI,wBAAyB,QAAS,uCAAwC,CAAE,EAS7FD,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,iBAAkB,QAAS,gCAAiC,CAAE,EAS/ED,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,cAAe,QAAS,4BAA6B,CAAE,EASxED,EAAaC,EAAI,mBAAoB,QAAS,kCAAmC,CAAE,EASnFD,EAAaC,EAAI,YAAa,QAAS,sCAAuC,CAAE,EAShFD,EAAaC,EAAI,cAAe,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAI,mBAAoB,QAAS,mCAAoC,CAAE,EASpFD,EAAaC,EAAI,kBAAmB,QAAS,iCAAkC,CAAE,EASjFD,EAAaC,EAAI,gBAAiB,QAAS,+BAAgC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,8BAA+B,CAAE,EAS3ED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAStED,EAAaC,EAAI,aAAc,QAAS,2BAA4B,CAAE,EAKtE,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..efa6da6 --- /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 t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";export{default as anyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";export{default as anyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-any-by-right@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";export{default as bifurcateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-bifurcate-by@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";export{default as composeAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-compose@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";export{default as countByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-count-by@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";export{default as doUntilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-until@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";export{default as doWhileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-do-while@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";export{default as everyByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";export{default as everyByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-every-by-right@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";export{default as forEachAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";export{default as forEachRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-for-each-right@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";export{default as functionSequenceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-function-sequence@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";export{default as groupByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-group-by@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";export{default as ifelseAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-else@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";export{default as ifthenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-if-then@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";export{default as inmapAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";export{default as inmapRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-inmap-right@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";export{default as mapFunAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-function@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";export{default as mapKeysAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-keys@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";export{default as mapValuesAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-map-values@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";export{default as noneByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";export{default as noneByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-none-by-right@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";export{default as reduceAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";export{default as reduceRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-reduce-right@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";export{default as waterfall}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-series-waterfall@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";export{default as someByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by@v0.2.2-esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";export{default as someByRightAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-some-by-right@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";export{default as tabulateByAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-tabulate-by@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";export{default as trycatchAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-catch@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";export{default as trythenAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-try-then@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";export{default as untilAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-until@v0.2.2-esm/index.mjs";import U from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";export{default as whileAsync}from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-async-while@v0.2.2-esm/index.mjs";var V={};s(V,"anyByAsync",t),s(V,"anyByRightAsync",e),s(V,"bifurcateByAsync",n),s(V,"composeAsync",i),s(V,"countByAsync",d),s(V,"doUntilAsync",l),s(V,"doWhileAsync",m),s(V,"everyByAsync",r),s(V,"everyByRightAsync",c),s(V,"forEachAsync",y),s(V,"forEachRightAsync",a),s(V,"functionSequenceAsync",j),s(V,"groupByAsync",o),s(V,"ifelseAsync",h),s(V,"ifthenAsync",p),s(V,"inmapAsync",u),s(V,"inmapRightAsync",v),s(V,"mapFunAsync",f),s(V,"mapKeysAsync",x),s(V,"mapValuesAsync",b),s(V,"noneByAsync",g),s(V,"noneByRightAsync",A),s(V,"reduceAsync",B),s(V,"reduceRightAsync",R),s(V,"waterfall",w),s(V,"someByAsync",q),s(V,"someByRightAsync",E),s(V,"tabulateByAsync",k),s(V,"trycatchAsync",F),s(V,"trythenAsync",K),s(V,"untilAsync",S),s(V,"whileAsync",U);export{V as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..c5282a9 --- /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 anyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by}\n*/\nimport anyByAsync from '@stdlib/utils-async-any-by';\nsetReadOnly( ns, 'anyByAsync', anyByAsync );\n\n/**\n* @name anyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/any-by-right}\n*/\nimport anyByRightAsync from '@stdlib/utils-async-any-by-right';\nsetReadOnly( ns, 'anyByRightAsync', anyByRightAsync );\n\n/**\n* @name bifurcateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/bifurcate-by}\n*/\nimport bifurcateByAsync from '@stdlib/utils-async-bifurcate-by';\nsetReadOnly( ns, 'bifurcateByAsync', bifurcateByAsync );\n\n/**\n* @name composeAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/compose}\n*/\nimport composeAsync from '@stdlib/utils-async-compose';\nsetReadOnly( ns, 'composeAsync', composeAsync );\n\n/**\n* @name countByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/count-by}\n*/\nimport countByAsync from '@stdlib/utils-async-count-by';\nsetReadOnly( ns, 'countByAsync', countByAsync );\n\n/**\n* @name doUntilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-until}\n*/\nimport doUntilAsync from '@stdlib/utils-async-do-until';\nsetReadOnly( ns, 'doUntilAsync', doUntilAsync );\n\n/**\n* @name doWhileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/do-while}\n*/\nimport doWhileAsync from '@stdlib/utils-async-do-while';\nsetReadOnly( ns, 'doWhileAsync', doWhileAsync );\n\n/**\n* @name everyByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by}\n*/\nimport everyByAsync from '@stdlib/utils-async-every-by';\nsetReadOnly( ns, 'everyByAsync', everyByAsync );\n\n/**\n* @name everyByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/every-by-right}\n*/\nimport everyByRightAsync from '@stdlib/utils-async-every-by-right';\nsetReadOnly( ns, 'everyByRightAsync', everyByRightAsync );\n\n/**\n* @name forEachAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each}\n*/\nimport forEachAsync from '@stdlib/utils-async-for-each';\nsetReadOnly( ns, 'forEachAsync', forEachAsync );\n\n/**\n* @name forEachRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/for-each-right}\n*/\nimport forEachRightAsync from '@stdlib/utils-async-for-each-right';\nsetReadOnly( ns, 'forEachRightAsync', forEachRightAsync );\n\n/**\n* @name functionSequenceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/function-sequence}\n*/\nimport functionSequenceAsync from '@stdlib/utils-async-function-sequence';\nsetReadOnly( ns, 'functionSequenceAsync', functionSequenceAsync );\n\n/**\n* @name groupByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/group-by}\n*/\nimport groupByAsync from '@stdlib/utils-async-group-by';\nsetReadOnly( ns, 'groupByAsync', groupByAsync );\n\n/**\n* @name ifelseAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-else}\n*/\nimport ifelseAsync from '@stdlib/utils-async-if-else';\nsetReadOnly( ns, 'ifelseAsync', ifelseAsync );\n\n/**\n* @name ifthenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/if-then}\n*/\nimport ifthenAsync from '@stdlib/utils-async-if-then';\nsetReadOnly( ns, 'ifthenAsync', ifthenAsync );\n\n/**\n* @name inmapAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap}\n*/\nimport inmapAsync from '@stdlib/utils-async-inmap';\nsetReadOnly( ns, 'inmapAsync', inmapAsync );\n\n/**\n* @name inmapRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/inmap-right}\n*/\nimport inmapRightAsync from '@stdlib/utils-async-inmap-right';\nsetReadOnly( ns, 'inmapRightAsync', inmapRightAsync );\n\n/**\n* @name mapFunAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-function}\n*/\nimport mapFunAsync from '@stdlib/utils-async-map-function';\nsetReadOnly( ns, 'mapFunAsync', mapFunAsync );\n\n/**\n* @name mapKeysAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-keys}\n*/\nimport mapKeysAsync from '@stdlib/utils-async-map-keys';\nsetReadOnly( ns, 'mapKeysAsync', mapKeysAsync );\n\n/**\n* @name mapValuesAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/map-values}\n*/\nimport mapValuesAsync from '@stdlib/utils-async-map-values';\nsetReadOnly( ns, 'mapValuesAsync', mapValuesAsync );\n\n/**\n* @name noneByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by}\n*/\nimport noneByAsync from '@stdlib/utils-async-none-by';\nsetReadOnly( ns, 'noneByAsync', noneByAsync );\n\n/**\n* @name noneByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/none-by-right}\n*/\nimport noneByRightAsync from '@stdlib/utils-async-none-by-right';\nsetReadOnly( ns, 'noneByRightAsync', noneByRightAsync );\n\n/**\n* @name reduceAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce}\n*/\nimport reduceAsync from '@stdlib/utils-async-reduce';\nsetReadOnly( ns, 'reduceAsync', reduceAsync );\n\n/**\n* @name reduceRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/reduce-right}\n*/\nimport reduceRightAsync from '@stdlib/utils-async-reduce-right';\nsetReadOnly( ns, 'reduceRightAsync', reduceRightAsync );\n\n/**\n* @name waterfall\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/series-waterfall}\n*/\nimport waterfall from '@stdlib/utils-async-series-waterfall';\nsetReadOnly( ns, 'waterfall', waterfall );\n\n/**\n* @name someByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by}\n*/\nimport someByAsync from '@stdlib/utils-async-some-by';\nsetReadOnly( ns, 'someByAsync', someByAsync );\n\n/**\n* @name someByRightAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/some-by-right}\n*/\nimport someByRightAsync from '@stdlib/utils-async-some-by-right';\nsetReadOnly( ns, 'someByRightAsync', someByRightAsync );\n\n/**\n* @name tabulateByAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/tabulate-by}\n*/\nimport tabulateByAsync from '@stdlib/utils-async-tabulate-by';\nsetReadOnly( ns, 'tabulateByAsync', tabulateByAsync );\n\n/**\n* @name trycatchAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-catch}\n*/\nimport trycatchAsync from '@stdlib/utils-async-try-catch';\nsetReadOnly( ns, 'trycatchAsync', trycatchAsync );\n\n/**\n* @name trythenAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/try-then}\n*/\nimport trythenAsync from '@stdlib/utils-async-try-then';\nsetReadOnly( ns, 'trythenAsync', trythenAsync );\n\n/**\n* @name untilAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/until}\n*/\nimport untilAsync from '@stdlib/utils-async-until';\nsetReadOnly( ns, 'untilAsync', untilAsync );\n\n/**\n* @name whileAsync\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/utils/async/while}\n*/\nimport whileAsync from '@stdlib/utils-async-while';\nsetReadOnly( ns, 'whileAsync', whileAsync );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","anyByAsync","anyByRightAsync","bifurcateByAsync","composeAsync","countByAsync","doUntilAsync","doWhileAsync","everyByAsync","everyByRightAsync","forEachAsync","forEachRightAsync","functionSequenceAsync","groupByAsync","ifelseAsync","ifthenAsync","inmapAsync","inmapRightAsync","mapFunAsync","mapKeysAsync","mapValuesAsync","noneByAsync","noneByRightAsync","reduceAsync","reduceRightAsync","waterfall","someByAsync","someByRightAsync","tabulateByAsync","trycatchAsync","trythenAsync","untilAsync","whileAsync"],"mappings":";;o2NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,aAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,mBAAAI,GAUAH,EAAAD,EAAA,eAAAK,GAUAJ,EAAAD,EAAA,eAAAM,GAUAL,EAAAD,EAAA,eAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,oBAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,oBAAAY,GAUAX,EAAAD,EAAA,wBAAAa,GAUAZ,EAAAD,EAAA,eAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,cAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,kBAAAkB,GAUAjB,EAAAD,EAAA,cAAAmB,GAUAlB,EAAAD,EAAA,eAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,cAAAsB,GAUArB,EAAAD,EAAA,mBAAAuB,GAUAtB,EAAAD,EAAA,cAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,YAAA0B,GAUAzB,EAAAD,EAAA,cAAA2B,GAUA1B,EAAAD,EAAA,mBAAA4B,GAUA3B,EAAAD,EAAA,kBAAA6B,GAUA5B,EAAAD,EAAA,gBAAA8B,GAUA7B,EAAAD,EAAA,eAAA+B,GAUA9B,EAAAD,EAAA,aAAAgC,GAUA/B,EAAAD,EAAA,aAAAiC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 5adbf8c..0000000 --- a/lib/index.js +++ /dev/null @@ -1,330 +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 anyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by} -*/ -setReadOnly( ns, 'anyByAsync', require( '@stdlib/utils-async-any-by' ) ); - -/** -* @name anyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/any-by-right} -*/ -setReadOnly( ns, 'anyByRightAsync', require( '@stdlib/utils-async-any-by-right' ) ); - -/** -* @name bifurcateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/bifurcate-by} -*/ -setReadOnly( ns, 'bifurcateByAsync', require( '@stdlib/utils-async-bifurcate-by' ) ); - -/** -* @name composeAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/compose} -*/ -setReadOnly( ns, 'composeAsync', require( '@stdlib/utils-async-compose' ) ); - -/** -* @name countByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/count-by} -*/ -setReadOnly( ns, 'countByAsync', require( '@stdlib/utils-async-count-by' ) ); - -/** -* @name doUntilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-until} -*/ -setReadOnly( ns, 'doUntilAsync', require( '@stdlib/utils-async-do-until' ) ); - -/** -* @name doWhileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/do-while} -*/ -setReadOnly( ns, 'doWhileAsync', require( '@stdlib/utils-async-do-while' ) ); - -/** -* @name everyByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by} -*/ -setReadOnly( ns, 'everyByAsync', require( '@stdlib/utils-async-every-by' ) ); - -/** -* @name everyByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/every-by-right} -*/ -setReadOnly( ns, 'everyByRightAsync', require( '@stdlib/utils-async-every-by-right' ) ); - -/** -* @name forEachAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each} -*/ -setReadOnly( ns, 'forEachAsync', require( '@stdlib/utils-async-for-each' ) ); - -/** -* @name forEachRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/for-each-right} -*/ -setReadOnly( ns, 'forEachRightAsync', require( '@stdlib/utils-async-for-each-right' ) ); - -/** -* @name functionSequenceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/function-sequence} -*/ -setReadOnly( ns, 'functionSequenceAsync', require( '@stdlib/utils-async-function-sequence' ) ); - -/** -* @name groupByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/group-by} -*/ -setReadOnly( ns, 'groupByAsync', require( '@stdlib/utils-async-group-by' ) ); - -/** -* @name ifelseAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-else} -*/ -setReadOnly( ns, 'ifelseAsync', require( '@stdlib/utils-async-if-else' ) ); - -/** -* @name ifthenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/if-then} -*/ -setReadOnly( ns, 'ifthenAsync', require( '@stdlib/utils-async-if-then' ) ); - -/** -* @name inmapAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap} -*/ -setReadOnly( ns, 'inmapAsync', require( '@stdlib/utils-async-inmap' ) ); - -/** -* @name inmapRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/inmap-right} -*/ -setReadOnly( ns, 'inmapRightAsync', require( '@stdlib/utils-async-inmap-right' ) ); - -/** -* @name mapFunAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-function} -*/ -setReadOnly( ns, 'mapFunAsync', require( '@stdlib/utils-async-map-function' ) ); - -/** -* @name mapKeysAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-keys} -*/ -setReadOnly( ns, 'mapKeysAsync', require( '@stdlib/utils-async-map-keys' ) ); - -/** -* @name mapValuesAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/map-values} -*/ -setReadOnly( ns, 'mapValuesAsync', require( '@stdlib/utils-async-map-values' ) ); - -/** -* @name noneByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by} -*/ -setReadOnly( ns, 'noneByAsync', require( '@stdlib/utils-async-none-by' ) ); - -/** -* @name noneByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/none-by-right} -*/ -setReadOnly( ns, 'noneByRightAsync', require( '@stdlib/utils-async-none-by-right' ) ); - -/** -* @name reduceAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce} -*/ -setReadOnly( ns, 'reduceAsync', require( '@stdlib/utils-async-reduce' ) ); - -/** -* @name reduceRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/reduce-right} -*/ -setReadOnly( ns, 'reduceRightAsync', require( '@stdlib/utils-async-reduce-right' ) ); - -/** -* @name waterfall -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/series-waterfall} -*/ -setReadOnly( ns, 'waterfall', require( '@stdlib/utils-async-series-waterfall' ) ); - -/** -* @name someByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by} -*/ -setReadOnly( ns, 'someByAsync', require( '@stdlib/utils-async-some-by' ) ); - -/** -* @name someByRightAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/some-by-right} -*/ -setReadOnly( ns, 'someByRightAsync', require( '@stdlib/utils-async-some-by-right' ) ); - -/** -* @name tabulateByAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/tabulate-by} -*/ -setReadOnly( ns, 'tabulateByAsync', require( '@stdlib/utils-async-tabulate-by' ) ); - -/** -* @name trycatchAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-catch} -*/ -setReadOnly( ns, 'trycatchAsync', require( '@stdlib/utils-async-try-catch' ) ); - -/** -* @name trythenAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/try-then} -*/ -setReadOnly( ns, 'trythenAsync', require( '@stdlib/utils-async-try-then' ) ); - -/** -* @name untilAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/until} -*/ -setReadOnly( ns, 'untilAsync', require( '@stdlib/utils-async-until' ) ); - -/** -* @name whileAsync -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/utils/async/while} -*/ -setReadOnly( ns, 'whileAsync', require( '@stdlib/utils-async-while' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 2aeda6f..fa6a2e4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Standard async 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/utils-async-any-by": "^0.2.2", - "@stdlib/utils-async-any-by-right": "^0.2.2", - "@stdlib/utils-async-bifurcate-by": "^0.2.2", - "@stdlib/utils-async-compose": "^0.2.2", - "@stdlib/utils-async-count-by": "^0.2.2", - "@stdlib/utils-async-do-until": "^0.2.2", - "@stdlib/utils-async-do-while": "^0.2.2", - "@stdlib/utils-async-every-by": "^0.2.2", - "@stdlib/utils-async-every-by-right": "^0.2.2", - "@stdlib/utils-async-for-each": "^0.2.2", - "@stdlib/utils-async-for-each-right": "^0.2.2", - "@stdlib/utils-async-function-sequence": "^0.2.2", - "@stdlib/utils-async-group-by": "^0.2.2", - "@stdlib/utils-async-if-else": "^0.2.2", - "@stdlib/utils-async-if-then": "^0.2.2", - "@stdlib/utils-async-inmap": "^0.2.2", - "@stdlib/utils-async-inmap-right": "^0.2.2", - "@stdlib/utils-async-map-function": "^0.2.2", - "@stdlib/utils-async-map-keys": "^0.2.2", - "@stdlib/utils-async-map-values": "^0.2.2", - "@stdlib/utils-async-none-by": "^0.2.2", - "@stdlib/utils-async-none-by-right": "^0.2.2", - "@stdlib/utils-async-reduce": "^0.2.2", - "@stdlib/utils-async-reduce-right": "^0.2.2", - "@stdlib/utils-async-series-waterfall": "^0.2.2", - "@stdlib/utils-async-some-by": "^0.2.2", - "@stdlib/utils-async-some-by-right": "^0.2.2", - "@stdlib/utils-async-tabulate-by": "^0.2.2", - "@stdlib/utils-async-try-catch": "^0.2.2", - "@stdlib/utils-async-try-then": "^0.2.2", - "@stdlib/utils-async-until": "^0.2.2", - "@stdlib/utils-async-while": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-array": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-function-array": "^0.2.2", - "@stdlib/assert-is-nan": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/constants-float64-eps": "^0.2.2", - "@stdlib/constants-float64-pinf": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-ceil": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/string-repeat": "^0.2.2", - "@stdlib/string-replace": "^0.2.2", - "@stdlib/utils-async-parallel": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-index-of": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-noop": "^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", "stdutil", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3b1f55d --- /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 af176bc..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 async utilities', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -});