From bca0fb03b83fc6ab6a2066563dfce21affae7f02 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Apr 2022 03:17:56 +0000 Subject: [PATCH 001/129] Auto-generated commit d3169f817dac6bdac859293b3d300a1bf9cbe3f4 --- CONTRIBUTORS | 28 + LICENSE | 481 +++++++++ NOTICE | 1 + README.md | 219 ++++ index.d.ts | 966 ++++++++++++++++++ index.mjs | 4 + index.mjs.map | 1 + package.json | 36 + stats.html | 2689 +++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 4425 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..6d99f79 --- /dev/null +++ b/README.md @@ -0,0 +1,219 @@ + + +# Node Streams + +[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] + +> Node.js streams. + + + +
+ +## Usage + +```javascript +import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +``` + +#### streams + +Namespace containing Node.js stream functionality. + +```javascript +var s = streams; +// returns {...} +``` + +The package contains the following streams: + + + +
+ +- [`debugSinkStream( [options,] [clbk] )`][@stdlib/streams/node/debug-sink]: writable stream for debugging stream pipelines. +- [`debugStream( [options,] [clbk] )`][@stdlib/streams/node/debug]: transform stream for debugging stream pipelines. +- [`emptyStream( [options] )`][@stdlib/streams/node/empty]: create an "empty" readable stream. +- [`arrayStream( src[, options] )`][@stdlib/streams/node/from-array]: create a readable stream from an array-like object. +- [`circularArrayStream( src[, options] )`][@stdlib/streams/node/from-circular-array]: create a readable stream from a circular array-like object. +- [`constantStream( value[, options] )`][@stdlib/streams/node/from-constant]: create a readable stream which always streams the same value. +- [`iteratorStream( iterator[, options] )`][@stdlib/streams/node/from-iterator]: create a readable stream from an iterator. +- [`stridedArrayStream( N, buffer, stride, offset[, options] )`][@stdlib/streams/node/from-strided-array]: create a readable stream from a strided array-like object. +- [`inspectSinkStream( [options,] clbk )`][@stdlib/streams/node/inspect-sink]: writable stream for inspecting streamed data. +- [`inspectStream( [options,] clbk )`][@stdlib/streams/node/inspect]: transform stream for inspecting streamed data. +- [`joinStream( [options] )`][@stdlib/streams/node/join]: transform stream which joins streamed data. +- [`splitStream( [options] )`][@stdlib/streams/node/split]: transform stream which splits streamed data. +- [`stderr`][@stdlib/streams/node/stderr]: standard error. +- [`stdin`][@stdlib/streams/node/stdin]: standard input. +- [`stdout`][@stdlib/streams/node/stdout]: standard output. +- [`transformStream( [options] )`][@stdlib/streams/node/transform]: transform stream. + +
+ + + +
+ + + +
+ +## 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..74ef78f --- /dev/null +++ b/index.d.ts @@ -0,0 +1,966 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2021 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); +import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); +import emptyStream = require( '@stdlib/streams-node-empty' ); +import arrayStream = require( '@stdlib/streams-node-from-array' ); +import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); +import constantStream = require( '@stdlib/streams-node-from-constant' ); +import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); +import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); +import inspectStream = require( '@stdlib/streams-node-inspect' ); +import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); +import joinStream = require( '@stdlib/streams-node-join' ); +import splitStream = require( '@stdlib/streams-node-split' ); +import stderr = require( '@stdlib/streams-node-stderr' ); +import stdin = require( '@stdlib/streams-node-stdin' ); +import stdout = require( '@stdlib/streams-node-stdout' ); +import transformStream = require( '@stdlib/streams-node-transform' ); + +/** +* Interface describing the `node` namespace. +*/ +interface Namespace { + /** + * Returns a debug stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var DebugStream = ns.debugStream; + * var stream = new DebugStream({ + * 'name': 'my-stream' + * }); + * + * stream.write( 'a' ); + * stream.write( 'b' ); + * stream.write( 'c' ); + * stream.end(); + * + * @example + * var opts = { + * 'objectMode': true, + * 'highWaterMark': 64 + * }; + * + * var factory = ns.debugStream.factory( opts ); + * + * // Assign each stream to a separate debug namespace... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory( 'stream '+i ) ); + * } + * + * @example + * var stream = ns.debugStream.objectMode(); + * + * stream.write( {'value': 'a'} ); + * stream.write( {'value': 'b'} ); + * stream.write( {'value': 'c'} ); + * stream.end(); + */ + debugStream: typeof debugStream; + + /** + * Returns an debug sink stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var DebugSinkStream = ns.debugSinkStream; + * var stream = new DebugSinkStream({ + * 'name': 'my-stream' + * }); + * + * stream.write( 'a' ); + * stream.write( 'b' ); + * stream.write( 'c' ); + * stream.end(); + * + * @example + * var opts = { + * 'objectMode': true, + * 'highWaterMark': 64 + * }; + * + * var factory = ns.debugSinkStream.factory( opts ); + * + * // Assign each stream to a separate debug namespace... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory( 'stream '+i ) ); + * } + * @example + * var stream = ns.debugSinkStream.objectMode({ + * 'name': 'my-stream' + * }); + * + * stream.write( {'value': 'a'} ); + * stream.write( {'value': 'b'} ); + * stream.write( {'value': 'c'} ); + * stream.end(); + */ + debugSinkStream: typeof debugSinkStream; + + /** + * Returns an "empty" stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var EmptyStream = ns.emptyStream; + * var stream = new EmptyStream(); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var stream = ns.emptyStream(); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var opts = { + * 'objectMode': false + * }; + * + * var createStream = ns.emptyStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( createStream() ); + * } + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( v ) { + * console.log( v ); + * } + * + * var stream = ns.emptyStream.objectMode(); + * + * stream.pipe( inspectStream.objectMode( log ) ); + */ + emptyStream: typeof emptyStream; + + /** + * Creates a readable stream from an array-like object. + * + * @param src - source array-like object + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var ArrayStream = ns.arrayStream; + * var stream = new ArrayStream( arr ); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var opts = { + * 'sep': ',', + * 'objectMode': false, + * 'encoding': 'utf8', + * 'highWaterMark': 64 + * }; + * + * var createStream = ns.arrayStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * for ( i = 0; i < 10; i++ ) { + * streams.push( createStream( arr ) ); + * } + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * function log( v ) { + * console.log( v ); + * } + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var stream = ns.arrayStream.objectMode( arr ); + * + * stream.pipe( inspectStream.objectMode( log ) ); + */ + arrayStream: typeof arrayStream; + + /** + * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. + * + * @param src - source array-like object + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var opts = { + * 'iter': arr.length * 2 + * }; + * + * var CircularArrayStream = ns.circularArrayStream; + * var stream = new CircularArrayStream( arr, opts ); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var opts = { + * 'sep': ',', + * 'objectMode': false, + * 'encoding': 'utf8', + * 'highWaterMark': 64 + * }; + * + * var createStream = ns.circularArrayStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * for ( i = 0; i < 10; i++ ) { + * streams.push( createStream( arr ) ); + * } + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * function log( v ) { + * console.log( v ); + * } + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var opts = { + * 'iter': arr.length * 2 + * }; + * + * var stream = ns.circularArrayStream.objectMode( arr, opts ); + * + * stream.pipe( inspectStream.objectMode( log ) ); + */ + circularArrayStream: typeof circularArrayStream; + + /** + * Returns a readable stream which always streams the same value. + * + * @param value - value to stream + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var opts = { + * 'iter': 10 + * }; + * + * var ConstantStream = ns.constantStream; + * var stream = new ConstantStream( 'beep', opts ); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var opts = { + * 'sep': ',', + * 'objectMode': false, + * 'encoding': 'utf8', + * 'highWaterMark': 64 + * }; + * + * var createStream = ns.constantStream.factory( 'beep', opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( createStream() ); + * } + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( v ) { + * console.log( v ); + * } + * + * var opts = { + * 'iter': 10 + * }; + * + * var stream = ns.constantStream.objectMode( 3.14, opts ); + * + * stream.pipe( inspectStream.objectMode( log ) ); + */ + constantStream: typeof constantStream; + + /** + * Creates a readable stream from an iterator. + * + * @param iterator - source iterator + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var randu = require( `@stdlib/random/iter/randu` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var opts = { + * 'iter': 10 + * }; + * + * var IteratorStream = ns.iteratorStream; + * var stream = new IteratorStream( randu( opts ) ); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var randu = require( `@stdlib/random/iter/randu` ); + * + * var opts = { + * 'sep': ',', + * 'objectMode': false, + * 'encoding': 'utf8', + * 'highWaterMark': 64 + * }; + * + * var createStream = ns.iteratorStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( createStream( randu() ) ); + * } + * + * @example + * var randu = require( `@stdlib/random/iter/randu` ); + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( v ) { + * console.log( v ); + * } + * + * var opts = { + * 'iter': 10 + * }; + * + * var stream = ns.iteratorStream.objectMode( randu( opts ) ); + * + * stream.pipe( inspectStream.objectMode( log ) ); + */ + iteratorStream: typeof iteratorStream; + + /** + * Creates a readable stream from a strided array-like object. + * + * @param N - number of values to stream + * @param buffer - source value + * @param stride - stride length + * @param offset - starting index + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var StridedArrayStream = ns.stridedArrayStream; + * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); + * + * stream.pipe( inspectStream( log ) ); + * + * @example + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var opts = { + * 'sep': ',', + * 'objectMode': false, + * 'encoding': 'utf8', + * 'highWaterMark': 64 + * }; + * + * var createStream = ns.stridedArrayStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * for ( i = 0; i < 10; i++ ) { + * streams.push( createStream( arr.length, arr, 1, 0 ) ); + * } + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * var Float64Array = require( `@stdlib/array/float64` ); + * var randu = require( `@stdlib/random/base/randu` ); + * + * function log( v ) { + * console.log( v ); + * } + * + * var arr = new Float64Array( 10 ); + * var i; + * for ( i = 0; i < arr.length; i++ ) { + * arr[ i ] = randu(); + * } + * + * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); + * + * stream.pipe( inspectStream.objectMode( log ) ); + */ + stridedArrayStream: typeof stridedArrayStream; + + /** + * Returns an inspect stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var InspectStream = ns.inspectStream; + * var stream = new InspectStream( {}, log ); + * + * stream.write( 'a' ); + * stream.write( 'b' ); + * stream.write( 'c' ); + * + * stream.end(); + * + * // prints: index: 0 + * // prints: a + * // prints: index: 1 + * // prints: b + * // prints: index: 2 + * // prints: c + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var opts = { + * 'objectMode': true, + * 'highWaterMark': 64 + * }; + * + * var factory = ns.inspectStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory( log ) ); + * } + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var opts = { + * 'objectMode': true, + * 'highWaterMark': 64 + * }; + * + * var factory = ns.inspectStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory( log ) ); + * } + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var stream = ns.inspectStream.objectMode( {}, log ); + * + * stream.write( {'value': 'a'} ); + * stream.write( {'value': 'b'} ); + * stream.write( {'value': 'c'} ); + * + * stream.end(); + * + * // prints: index: 0 + * // prints: {'value': 'a'} + * // prints: index: 1 + * // prints: {'value': 'b'} + * // prints: index: 2 + * // prints: {'value': 'c'} + */ + inspectStream: typeof inspectStream; + + /** + * Returns an inspect sink stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var InspectSinkStream = ns.inspectSinkStream; + * var stream = new InspectSinkStream( {}, log ); + * + * stream.write( 'a' ); + * stream.write( 'b' ); + * stream.write( 'c' ); + * + * stream.end(); + * + * // prints: index: 0 + * // prints: a + * // prints: index: 1 + * // prints: b + * // prints: index: 2 + * // prints: c + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var opts = { + * 'objectMode': true, + * 'highWaterMark': 64 + * }; + * + * var factory = ns.inspectSinkStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory( log ) ); + * } + * + * @example + * function log( chunk, idx ) { + * console.log( 'index: %d', idx ); + * console.log( chunk ); + * } + * + * var stream = ns.inspectSinkStream.objectMode( {}, log ); + * + * stream.write( {'value': 'a'} ); + * stream.write( {'value': 'b'} ); + * stream.write( {'value': 'c'} ); + * + * stream.end(); + * + * // prints: 'index: 0' + * // prints: {'value': 'a'} + * // prints: 'index: 1' + * // prints: {'value': 'b'} + * // prints: 'index: 2' + * // prints: {'value': 'c'} + */ + inspectSinkStream: typeof inspectSinkStream; + + /** + * Returns a join stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( chunk ) { + * console.log( chunk ); + * } + * + * var JoinStream = ns.joinStream; + * var stream = new JoinStream(); + * + * stream.pipe( inspectStream( log ) ); + * + * stream.write( '1' ); + * stream.write( '2' ); + * stream.write( '3' ); + * + * stream.end(); + * + * // prints: '1\n2\n3' + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( chunk ) { + * console.log( chunk ); + * } + * + * var stream = ns.joinStream(); + * + * stream.pipe( inspectStream( log ) ); + * + * stream.write( '1' ); + * stream.write( '2' ); + * stream.write( '3' ); + * + * stream.end(); + * + * // prints: '1\n2\n3'; + * + * @example + * var opts = { + * 'sep': '\t', + * 'objectMode': true, + * 'encoding': 'utf8', + * 'highWaterMark': 64 + * }; + * + * var factory = ns.joinStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory() ); + * } + * + * @example + * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); + * + * function log( chunk ) { + * console.log( chunk.toString() ); + * } + * + * var stream = ns.joinStream.objectMode({ + * 'sep': ',' + * }); + * + * stream.pipe( inspectStream( log ) ); + * + * stream.write( 'a' ); + * stream.write( 'b' ); + * stream.write( 'c' ); + * + * stream.end(); + * + * // prints: 'a,b,c' + */ + joinStream: typeof joinStream; + + /** + * Returns a split stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var SplitStream = ns.splitStream; + * var stream = new SplitStream(); + * + * stream.write( '1\n2\n3' ); + * stream.end(); + * + * @example + * var stream = ns.splitStream(); + * + * stream.write( '1\n2\n3' ); + * stream.end(); + * + * @example + * var opts = { + * 'sep': '\t', + * 'objectMode': true, + * 'encoding': 'utf8' + * }; + * + * var factory = ns.splitStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory() ); + * } + * + * @example + * var stream = ns.splitStream.objectMode({ + * 'sep': ',' + * }); + * + * stream.write( 'a,b,c' ); + * stream.end(); + */ + splitStream: typeof splitStream; + + /** + * Standard error. + */ + stderr: typeof stderr; + + /** + * Standard input. + */ + stdin: typeof stdin; + + /** + * Standard output. + */ + stdout: typeof stdout; + + /** + * Returns a transform stream. + * + * @param options - stream options + * @throws must provide valid options + * @returns stream instance + * + * @example + * var stdout = require( `@stdlib/streams/node/stdout` ); + * + * function transform( chunk, enc, clbk ) { + * clbk( null, chunk.toString()+'\n' ); + * } + * + * var opts = { + * 'transform': transform + * }; + * var TransformStream = ns.transformStream; + * var stream = new TransformStream( opts ); + * + * stream.pipe( stdout ); + * + * stream.write( '1' ); + * stream.write( '2' ); + * stream.write( '3' ); + * + * stream.end(); + * + * // prints: '1\n2\n3\n' + * + * @example + * var stdout = require( `@stdlib/streams/node/stdout` ); + * + * function transform( chunk, enc, clbk ) { + * clbk( null, chunk.toString()+'\n' ); + * } + * + * var opts = { + * 'transform': transform + * }; + * var stream = ns.transformStream( opts ); + * + * stream.pipe( stdout ); + * + * stream.write( '1' ); + * stream.write( '2' ); + * stream.write( '3' ); + * + * stream.end(); + * + * // prints: '1\n2\n3\n' + * + * @example + * function transform( chunk, enc, clbk ) { + * clbk( null, chunk.toString()+'\n' ); + * } + * + * var opts = { + * 'objectMode': true, + * 'encoding': 'utf8', + * 'highWaterMark': 64, + * 'decodeStrings': false + * }; + * + * var factory = ns.transformStream.factory( opts ); + * + * // Create 10 identically configured streams... + * var streams = []; + * var i; + * for ( i = 0; i < 10; i++ ) { + * streams.push( factory( transform ) ); + * } + * + * @example + * var stdout = require( `@stdlib/streams/node/stdout` ); + * + * function stringify( chunk, enc, clbk ) { + * clbk( null, JSON.stringify( chunk ) ); + * } + * + * function newline( chunk, enc, clbk ) { + * clbk( null, chunk+'\n' ); + * } + * + * var s1 = ns.transformStream.objectMode({ + * 'transform': stringify + * }); + * + * var s2 = ns.transformStream.objectMode({ + * 'transform': newline + * }); + * + * s1.pipe( s2 ).pipe( stdout ); + * + * s1.write( {'value': 'a'} ); + * s1.write( {'value': 'b'} ); + * s1.write( {'value': 'c'} ); + * + * s1.end(); + * + * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' + */ + transformStream: typeof transformStream; +} + +/** +* Node.js streams. +*/ +declare var ns: Namespace; + + +// EXPORTS // + +export = ns; diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..663ce97 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b=s,g={};b(g,"debugStream",t),b(g,"debugSinkStream",e),b(g,"emptyStream",r),b(g,"arrayStream",d),b(g,"circularArrayStream",m),b(g,"constantStream",n),b(g,"iteratorStream",i),b(g,"stridedArrayStream",a),b(g,"inspectStream",o),b(g,"inspectSinkStream",j),b(g,"joinStream",l),b(g,"splitStream",p),b(g,"stderr",h),b(g,"stdin",f),b(g,"stdout",c),b(g,"transformStream",x);var v=g;export{v as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..36df6a4 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"],"names":["setReadOnly","require$$0","streams","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","lib"],"mappings":";;6wGA0BA,IAAAA,EAAAC,EAUAC,EAAA,GASAF,EAAAE,EAAA,cAAAC,GASAH,EAAAE,EAAA,kBAAAE,GASAJ,EAAAE,EAAA,cAAAG,GASAL,EAAAE,EAAA,cAAAI,GASAN,EAAAE,EAAA,sBAAAK,GASAP,EAAAE,EAAA,iBAAAM,GASAR,EAAAE,EAAA,iBAAAO,GASAT,EAAAE,EAAA,qBAAAQ,GASAV,EAAAE,EAAA,gBAAAS,GASAX,EAAAE,EAAA,oBAAAU,GASAZ,EAAAE,EAAA,aAAAW,GASAb,EAAAE,EAAA,cAAAY,GASAd,EAAAE,EAAA,SAAAa,GASAf,EAAAE,EAAA,QAAAc,GASAhB,EAAAE,EAAA,SAAAe,GASAjB,EAAAE,EAAA,kBAAAgB,GAKA,IAAAC,EAAAjB"} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..bbdaadb --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "name": "@stdlib/streams-node", + "version": "0.0.0", + "description": "Node.js streams.", + "license": "Apache-2.0", + "type": "module", + "main": "./index.mjs", + "homepage": "https://stdlib.io", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/streams-node.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "keywords": [ + "stdlib", + "standard", + "library", + "std", + "lib", + "streams", + "utilities", + "utility", + "utils", + "util", + "node", + "nodejs", + "node-js", + "node.js" + ], + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/athan" + } +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..83fd1f6 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + From 49e1a1a440b85e842ffab92804a364acd5a00fb0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 30 Jun 2022 22:14:05 +0000 Subject: [PATCH 002/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 68f5ad38ee77748221c893348e6293475906a464 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 09:18:42 +0000 Subject: [PATCH 003/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 663ce97..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b=s,g={};b(g,"debugStream",t),b(g,"debugSinkStream",e),b(g,"emptyStream",r),b(g,"arrayStream",d),b(g,"circularArrayStream",m),b(g,"constantStream",n),b(g,"iteratorStream",i),b(g,"stridedArrayStream",a),b(g,"inspectStream",o),b(g,"inspectSinkStream",j),b(g,"joinStream",l),b(g,"splitStream",p),b(g,"stderr",h),b(g,"stdin",f),b(g,"stdout",c),b(g,"transformStream",x);var v=g;export{v as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 36df6a4..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"],"names":["setReadOnly","require$$0","streams","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","lib"],"mappings":";;6wGA0BA,IAAAA,EAAAC,EAUAC,EAAA,GASAF,EAAAE,EAAA,cAAAC,GASAH,EAAAE,EAAA,kBAAAE,GASAJ,EAAAE,EAAA,cAAAG,GASAL,EAAAE,EAAA,cAAAI,GASAN,EAAAE,EAAA,sBAAAK,GASAP,EAAAE,EAAA,iBAAAM,GASAR,EAAAE,EAAA,iBAAAO,GASAT,EAAAE,EAAA,qBAAAQ,GASAV,EAAAE,EAAA,gBAAAS,GASAX,EAAAE,EAAA,oBAAAU,GASAZ,EAAAE,EAAA,aAAAW,GASAb,EAAAE,EAAA,cAAAY,GASAd,EAAAE,EAAA,SAAAa,GASAf,EAAAE,EAAA,QAAAc,GASAhB,EAAAE,EAAA,SAAAe,GASAjB,EAAAE,EAAA,kBAAAgB,GAKA,IAAAC,EAAAjB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 83fd1f6..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 577130c51afdcc12c6ee364a8f8d977fed6e2090 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 09:19:51 +0000 Subject: [PATCH 004/129] 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 | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 103 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3319 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 0cd47c1..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-06-30T22:07:18.425Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 e263764..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 node = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - node; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e401265 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..005d2a4 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9d21b651a93427b7de5c52e30df5d9a88984498d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 20:09:16 +0000 Subject: [PATCH 005/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 7f3aaecf5fcbaffe10cd1e89c690391cf0c70069 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Jul 2022 08:12:11 +0000 Subject: [PATCH 006/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e401265..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 005d2a4..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From ad7eab658f584a0a4beb025764ed5f5cf9abd29c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Jul 2022 08:13:06 +0000 Subject: [PATCH 007/129] 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 | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 103 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3319 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 3bc2969..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-07-01T01:11:35.517Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 e263764..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 node = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - node; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e401265 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..19c6639 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From db2a3a24306f25a9dbc7b1f8a04da322932e8d40 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 03:44:20 +0000 Subject: [PATCH 008/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 2870ce82bf817603b8a759f3be3cec9d6a7e3dad Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 14:10:54 +0000 Subject: [PATCH 009/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e401265..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 19c6639..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From d052cc3ecbcb1c3fce183a01d62e7d2bd397a08a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 14:12:03 +0000 Subject: [PATCH 010/129] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 33 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 103 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3358 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 4efb7fd..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-08-01T01:14:44.425Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 e263764..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 node = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - node; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e401265 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..f945fb9 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7b9fd2ce782a8a564444d1734b8bcb80af158d51 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 03:32:17 +0000 Subject: [PATCH 011/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 11d6734105fc2ef63bb5fd7808378159adc12fbe Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 13:36:42 +0000 Subject: [PATCH 012/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e401265..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index f945fb9..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From ebebf6f210f503cd9e2c0b6f6e38e340cc5638df Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 13:37:36 +0000 Subject: [PATCH 013/129] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 103 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3374 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 6bc431c..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-09-01T01:12:40.703Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 e263764..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 node = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - node; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e401265 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..18db059 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f1624d8bac0615ab974638ae8e998ef8971e57bb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 03:55:36 +0000 Subject: [PATCH 014/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 10124920c558462264a1cf0b8ac5467141a503d3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 18:10:30 +0000 Subject: [PATCH 015/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e401265..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 18db059..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From dade6d93c14db4902dce566d5e93187956cb53d4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 18:11:37 +0000 Subject: [PATCH 016/129] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 103 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3374 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 30064f8..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-10-01T01:37:39.132Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 e263764..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 node = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - node; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e401265 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3f5eb17 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 87e8f1bac5b4e7f49284945e735d9ca741d50aa1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 21:50:17 +0000 Subject: [PATCH 017/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 6a4b8ab70b11c209ad8c061aa8197b170e3a6216 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:35:38 +0000 Subject: [PATCH 018/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e401265..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3f5eb17..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 0a183576d3894d391da01e60060b7695954a03e9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:36:41 +0000 Subject: [PATCH 019/129] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 103 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2732 insertions(+), 3373 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 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..e401265 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..1142cfe --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3d655a17706788fdf3906b716f29b92c98580be7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 04:39:50 +0000 Subject: [PATCH 020/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 1beae6fd76a4876dd30fda3345bee18173b590aa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 19:32:34 +0000 Subject: [PATCH 021/129] Remove files --- index.d.ts | 966 ------------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3660 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index e401265..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 1142cfe..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 43c33d5cc846288c8dc2f189749a987436a7ac4a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 19:33:51 +0000 Subject: [PATCH 022/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4087 insertions(+), 3374 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 c72e11e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-11-01T01:25:49.364Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..71c2e53 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..f95d4b8 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ee703dc4cc6fefb2cb6e57960103d4125d62bbcd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 00:11:47 +0000 Subject: [PATCH 023/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04442b4..b7c63fe 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From bc7b9a0091d0170941d35323cd688d7b0c44c86f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 13:32:00 +0000 Subject: [PATCH 024/129] Remove files --- index.d.ts | 966 ------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5015 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 71c2e53..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index f95d4b8..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 39205376b7419b110a84391b9a948e8aeab7aaa8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 13:33:02 +0000 Subject: [PATCH 025/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 781 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4087 insertions(+), 3395 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 e1a7e06..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-11-03T22:03:11.855Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..71c2e53 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b7c63fe..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d05db20 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 8f780021e71478ab52350c13c623d2f3a38f9d16 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 01:53:27 +0000 Subject: [PATCH 026/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5742027..228ff9a 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From a605307a2864468ac0619c789f6b96d5ec14d31f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 17:37:44 +0000 Subject: [PATCH 027/129] Remove files --- index.d.ts | 966 ------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5015 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 71c2e53..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d05db20..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From baeaafba72d3315e7064c927b0ca12cde7ff2628 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 17:38:56 +0000 Subject: [PATCH 028/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 781 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 183 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4087 insertions(+), 3400 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 24459ae..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-12-01T01:52:44.805Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..f50353b --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 228ff9a..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.0", - "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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..ec899e7 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6bafb7da0cd992f31f68445031269d3aa74b3b87 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 02:57:32 +0000 Subject: [PATCH 029/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eeab5c8..3f35bcc 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From 280c1120ae6a17d7cbf2e5d11af8e005c82e7529 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 07:29:46 +0000 Subject: [PATCH 030/129] Remove files --- index.d.ts | 966 ------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5015 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index f50353b..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ec899e7..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From bf20d448bc107ed465b63801a79150fbce28c9f5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 07:31:01 +0000 Subject: [PATCH 031/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 791 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 184 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4087 insertions(+), 3411 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 bd7014e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-01-01T01:16:11.424Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 3f35bcc..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..c8f2238 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0129971d0f8eff2c691f8de7643bfdbc0ca1f936 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 03:53:16 +0000 Subject: [PATCH 032/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eeab5c8..3f35bcc 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.x", "@stdlib/random-base-randu": "^0.0.x", "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/string-format": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x", "@stdlib/utils-copy": "^0.0.x", "@stdlib/utils-define-nonenumerable-property": "^0.0.x", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", From ace8476ca465fa87e77ac6e20e75f673f355b91d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 12:15:34 +0000 Subject: [PATCH 033/129] Remove files --- index.d.ts | 966 ------------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 5015 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index c8f2238..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 37dfe0c6bc2949dc5606e4134e8a9d60cf6f3363 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 12:16:49 +0000 Subject: [PATCH 034/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 791 --- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 184 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3411 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 cce8332..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-02-01T01:40:42.188Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 2fd2d45..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/streams/node" -click B href "https://github.com/stdlib-js/streams-node/tree/main" -click C href "https://github.com/stdlib-js/streams-node/tree/production" -click D href "https://github.com/stdlib-js/streams-node/tree/esm" -click E href "https://github.com/stdlib-js/streams-node/tree/deno" -click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 3f35bcc..7f7a579 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.x", - "@stdlib/streams-node-debug-sink": "^0.0.x", - "@stdlib/streams-node-empty": "^0.0.x", - "@stdlib/streams-node-from-array": "^0.0.x", - "@stdlib/streams-node-from-circular-array": "^0.0.x", - "@stdlib/streams-node-from-constant": "^0.0.x", - "@stdlib/streams-node-from-iterator": "^0.0.x", - "@stdlib/streams-node-from-strided-array": "^0.0.x", - "@stdlib/streams-node-inspect": "^0.0.x", - "@stdlib/streams-node-inspect-sink": "^0.0.x", - "@stdlib/streams-node-join": "^0.0.x", - "@stdlib/streams-node-split": "^0.0.x", - "@stdlib/streams-node-stderr": "^0.0.x", - "@stdlib/streams-node-stdin": "^0.0.x", - "@stdlib/streams-node-stdout": "^0.0.x", - "@stdlib/streams-node-transform": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.x", - "@stdlib/array-to-iterator": "^0.0.x", - "@stdlib/array-uint8": "^0.0.x", - "@stdlib/assert-has-own-property": "^0.0.x", - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/assert-is-browser": "^0.0.x", - "@stdlib/assert-is-buffer": "^0.0.x", - "@stdlib/assert-is-collection": "^0.0.x", - "@stdlib/assert-is-error": "^0.0.x", - "@stdlib/assert-is-function": "^0.0.x", - "@stdlib/assert-is-integer": "^0.0.x", - "@stdlib/assert-is-iterator-like": "^0.0.x", - "@stdlib/assert-is-nonnegative-integer": "^0.0.x", - "@stdlib/assert-is-nonnegative-number": "^0.0.x", - "@stdlib/assert-is-plain-object": "^0.0.x", - "@stdlib/assert-is-regexp": "^0.0.x", - "@stdlib/assert-is-string": "^0.0.x", - "@stdlib/assert-is-uint8array": "^0.0.x", - "@stdlib/assert-is-windows": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/blas-base-gcopy": "^0.0.x", - "@stdlib/buffer-ctor": "^0.0.x", - "@stdlib/buffer-from-arraybuffer": "^0.0.x", - "@stdlib/buffer-from-string": "^0.0.x", - "@stdlib/fs-read-file": "^0.0.x", - "@stdlib/process-exec-path": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/random-iter-randu": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x", - "@stdlib/utils-copy": "^0.0.x", - "@stdlib/utils-define-nonenumerable-property": "^0.0.x", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x", - "@stdlib/utils-inherit": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "@stdlib/utils-next-tick": "^0.0.x", - "@stdlib/utils-noop": "^0.0.x", - "@stdlib/utils-parse-json": "^0.0.x", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..fb3c654 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 09f692eaa4ad77205d5a547312d7a620054af841 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 06:29:07 +0000 Subject: [PATCH 035/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f269b69..004a7c5 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-copy": "^0.0.7", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From 9fba1140c7851deb1803d09bc240ead8a416e2ff Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 15:35:32 +0000 Subject: [PATCH 036/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index fb3c654..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ee909b052c3129ca74e09991d84be6a42d9af769 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 15:36:32 +0000 Subject: [PATCH 037/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 236 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3546 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 1c0fc67..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-03-01T04:10:12.962Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 004a7c5..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-copy": "^0.0.7", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..0a56a0e --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 906e9e7c8aa583044d4d77f8e772dfddd3726779 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 07:01:42 +0000 Subject: [PATCH 038/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f269b69..004a7c5 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-copy": "^0.0.7", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From c5fbf6140fc3e1fe4417e5026200e4e4ab52b682 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 14:31:17 +0000 Subject: [PATCH 039/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 0a56a0e..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 361ac269932277166ed2c51585cca2e5c4ecd07c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 14:32:21 +0000 Subject: [PATCH 040/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3552 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 ed36fae..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-04-01T04:46:56.429Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 004a7c5..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-copy": "^0.0.7", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..2eaaca8 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 4f3833aa3e31566b9d887697180ca7b2b68fd079 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 May 2023 06:47:23 +0000 Subject: [PATCH 041/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f269b69..004a7c5 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-copy": "^0.0.7", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From a01972d6489f3f439a88f4d2d5f194ee131be4a6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 May 2023 14:11:02 +0000 Subject: [PATCH 042/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2eaaca8..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 41182d46be703bd86d4e7e3e5225d8a2d369a424 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 May 2023 14:12:23 +0000 Subject: [PATCH 043/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3552 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 86abd73..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-05-01T04:31:20.496Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 004a7c5..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-copy": "^0.0.7", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..79057b1 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9f4d4f23b576e70acae67725c85934bdefefcd1d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Jun 2023 06:28:28 +0000 Subject: [PATCH 044/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f269b69..004a7c5 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-copy": "^0.0.7", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From df2b49520246fe5f528d8833958a0bbfe09fbedf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Jun 2023 14:27:20 +0000 Subject: [PATCH 045/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 79057b1..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From aef2b798247cc096c9d0ca3b4a6236ade2d4e9ff Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Jun 2023 14:28:28 +0000 Subject: [PATCH 046/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3552 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 6c4cc57..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-06-01T04:09:31.925Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 004a7c5..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-copy": "^0.0.7", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6ca5645 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From fb9c2f56e5ef8190df1abeb629997e8bec90a4a3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Jul 2023 06:29:10 +0000 Subject: [PATCH 047/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f269b69..004a7c5 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-copy": "^0.0.7", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", From f51c1a35e417e5ca0c022be794f9da3a74804a81 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Jul 2023 14:50:38 +0000 Subject: [PATCH 048/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6ca5645..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 30ff8ac442b12540a5469f6594e6ec39029dbe94 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Jul 2023 14:51:44 +0000 Subject: [PATCH 049/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3552 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 d264491..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-07-01T04:09:26.615Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 004a7c5..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-copy": "^0.0.7", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..e1da6f7 --- /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 84f29b9..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From dfc83e08c472e32ed068f2a837eb5f8971f1fad9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Aug 2023 06:59:29 +0000 Subject: [PATCH 050/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ad1032..228228f 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", "@stdlib/utils-inherit": "^0.0.8", From d216834287803202e2e6151d2d904cd328c80ea7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Aug 2023 15:31:32 +0000 Subject: [PATCH 051/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index e1da6f7..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 81327ed76c6012791684b6b83991bd2bc2c5cbe6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Aug 2023 15:32:39 +0000 Subject: [PATCH 052/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6220 insertions(+), 3552 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 9aa6bbc..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T04:33:56.841Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 228228f..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/object-assign": "github:stdlib-js/object-assign#main", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..14d1d95 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From d28fbb61e5c313ca379e1ec093e8c2b18f9b3f1f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 18:36:06 +0000 Subject: [PATCH 053/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ad1032..228228f 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.0.7", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/utils-define-nonenumerable-property": "^0.0.7", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", "@stdlib/utils-inherit": "^0.0.8", From ed44929d6fd770970d5717a4224c49e6947cd95d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 18:56:13 +0000 Subject: [PATCH 054/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 74ef78f..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 14d1d95..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 420bfa0acd4a747293638f1816f8f0723ea60a56 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 18:57:42 +0000 Subject: [PATCH 055/129] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 36 files changed, 6220 insertions(+), 3549 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -126,7 +125,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -188,37 +187,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..4d82394 --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..9018062 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 228228f..c88832c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.6", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.0.7", - "@stdlib/streams-node-stderr": "^0.0.7", - "@stdlib/streams-node-stdin": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/streams-node-transform": "^0.0.7", - "@stdlib/utils-define-read-only-property": "^0.0.8" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.0.6", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-buffer": "^0.0.8", - "@stdlib/assert-is-collection": "^0.0.8", - "@stdlib/assert-is-error": "^0.0.8", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/assert-is-integer": "^0.0.8", - "@stdlib/assert-is-iterator-like": "^0.0.7", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-nonnegative-number": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/assert-is-regexp": "^0.0.7", - "@stdlib/assert-is-string": "^0.0.8", - "@stdlib/assert-is-uint8array": "^0.0.8", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.0.7", - "@stdlib/buffer-from-arraybuffer": "^0.0.6", - "@stdlib/buffer-from-string": "^0.0.8", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/object-assign": "github:stdlib-js/object-assign#main", - "@stdlib/process-exec-path": "^0.0.7", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2", - "@stdlib/utils-define-nonenumerable-property": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-inherit": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "@stdlib/utils-next-tick": "^0.0.8", - "@stdlib/utils-noop": "^0.0.14", - "@stdlib/utils-parse-json": "^0.0.8", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..0af0110 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3c9b9168a24531c19097df2a6c0bb008f9009b05 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 20:52:54 +0000 Subject: [PATCH 056/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8972f5..13f42df 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.1.0", "@stdlib/random-base-randu": "^0.0.8", "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/string-format": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0", "@stdlib/utils-define-nonenumerable-property": "^0.1.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", "@stdlib/utils-inherit": "^0.1.0", From d3f5933768ac5afe3d779d1bd888bb4e7080ff53 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 20:57:04 +0000 Subject: [PATCH 057/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 f8ed375..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 4d82394..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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@esm/index.mjs";var b={};s(b,"debugStream",t),s(b,"debugSinkStream",e),s(b,"emptyStream",r),s(b,"arrayStream",d),s(b,"circularArrayStream",m),s(b,"constantStream",n),s(b,"iteratorStream",i),s(b,"stridedArrayStream",o),s(b,"inspectStream",a),s(b,"inspectSinkStream",j),s(b,"joinStream",l),s(b,"splitStream",p),s(b,"stderr",h),s(b,"stdin",f),s(b,"stdout",c),s(b,"transformStream",x);export{b as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 9018062..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;6wGAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 0af0110..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7c69e78163794540634205c69fafa3101074620a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 20:59:22 +0000 Subject: [PATCH 058/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 37 files changed, 6220 insertions(+), 3584 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 4ee6a31..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/streams/node) 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 a486219..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/streams/node) 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 565e890..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..b90a2eb --- /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/streams-node-debug@esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.0-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.0-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.0-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var v={};s(v,"debugStream",t),s(v,"debugSinkStream",e),s(v,"emptyStream",r),s(v,"arrayStream",d),s(v,"circularArrayStream",m),s(v,"constantStream",n),s(v,"iteratorStream",i),s(v,"stridedArrayStream",o),s(v,"inspectStream",a),s(v,"inspectSinkStream",j),s(v,"joinStream",l),s(v,"splitStream",p),s(v,"stderr",h),s(v,"stdin",f),s(v,"stdout",c),s(v,"transformStream",x);export{v as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..8c77e88 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s3GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 13f42df..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.0.7", - "@stdlib/streams-node-debug-sink": "^0.0.6", - "@stdlib/streams-node-empty": "^0.0.7", - "@stdlib/streams-node-from-array": "^0.0.6", - "@stdlib/streams-node-from-circular-array": "^0.0.6", - "@stdlib/streams-node-from-constant": "^0.0.7", - "@stdlib/streams-node-from-iterator": "^0.0.6", - "@stdlib/streams-node-from-strided-array": "^0.0.6", - "@stdlib/streams-node-inspect": "^0.0.7", - "@stdlib/streams-node-inspect-sink": "^0.0.6", - "@stdlib/streams-node-join": "^0.0.7", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.0", - "@stdlib/streams-node-stdin": "^0.1.0", - "@stdlib/streams-node-stdout": "^0.1.0", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.0", - "@stdlib/array-to-iterator": "^0.0.6", - "@stdlib/array-uint8": "^0.1.0", - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-browser": "^0.1.0", - "@stdlib/assert-is-buffer": "^0.1.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.0", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.0", - "@stdlib/assert-is-regexp": "^0.1.0", - "@stdlib/assert-is-string": "^0.1.0", - "@stdlib/assert-is-uint8array": "^0.1.0", - "@stdlib/assert-is-windows": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/blas-base-gcopy": "^0.0.8", - "@stdlib/buffer-ctor": "^0.1.0", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.0", - "@stdlib/fs-read-file": "^0.1.0", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.0", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/random-iter-randu": "^0.0.6", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/utils-define-nonenumerable-property": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-inherit": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.0", - "@stdlib/utils-noop": "^0.1.0", - "@stdlib/utils-parse-json": "^0.1.0", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6f15b56 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9ae79909a222e2ca8ec6efacf40f4601f19def41 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 23 Sep 2023 21:00:20 +0000 Subject: [PATCH 059/129] 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 b41c320..02bfee4 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.1.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.1.0-esm/index.mjs'; ``` #### streams @@ -106,7 +106,7 @@ The package contains the following streams: - - - - From 38709a4102cf9461b6af998daf4236d9e2fdd046 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 2 Oct 2023 14:15:39 +0000 Subject: [PATCH 063/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 39 files changed, 6220 insertions(+), 3683 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 b2cc610..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-10-01T03:00:54.242Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 e52e6af..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..e55a819 --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.0-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.0-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.0-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index a3130f0..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.0", - "@stdlib/streams-node-stdin": "^0.1.0", - "@stdlib/streams-node-stdout": "^0.1.0", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.0", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.0", - "@stdlib/assert-has-own-property": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/assert-is-browser": "^0.1.0", - "@stdlib/assert-is-buffer": "^0.1.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.0", - "@stdlib/assert-is-function": "^0.1.0", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.0", - "@stdlib/assert-is-plain-object": "^0.1.0", - "@stdlib/assert-is-regexp": "^0.1.0", - "@stdlib/assert-is-string": "^0.1.0", - "@stdlib/assert-is-uint8array": "^0.1.0", - "@stdlib/assert-is-windows": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.0", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.0", - "@stdlib/fs-read-file": "^0.1.0", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0", - "@stdlib/utils-define-nonenumerable-property": "^0.1.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", - "@stdlib/utils-inherit": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.0", - "@stdlib/utils-noop": "^0.1.0", - "@stdlib/utils-parse-json": "^0.1.0", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7dee438 --- /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 1cab9b8..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 streams = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - 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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 48606e04d543d2309bdb8cf7eb357ec0778afe01 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 5 Oct 2023 12:05:30 +0000 Subject: [PATCH 064/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28a67f6..a72c219 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-define-nonenumerable-property": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-inherit": "^0.1.1", From 5cc32b94119a089aa1e07cd04c8b7e8ae589da3d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 6 Oct 2023 15:44:30 +0000 Subject: [PATCH 065/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 f8ed375..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e55a819..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.0-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.0-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.0-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7dee438..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b94a97ea322a97d2955f050b080d02f024337080 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 6 Oct 2023 15:47:21 +0000 Subject: [PATCH 066/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6220 insertions(+), 3682 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 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 e52e6af..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..d528bcf --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index a72c219..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.1", - "@stdlib/streams-node-stdin": "^0.1.1", - "@stdlib/streams-node-stdout": "^0.1.1", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.0", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.0", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-define-nonenumerable-property": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-inherit": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.1", - "@stdlib/utils-noop": "^0.1.1", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..c27e280 --- /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 1cab9b8..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 streams = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - 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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 659915de91c1c9f2dfa92001cc6ae7ceb9f96fa9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Nov 2023 08:35:13 +0000 Subject: [PATCH 067/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e02492..b11478d 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-define-nonenumerable-property": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-inherit": "^0.1.1", From f021177e04bdf74ba546a75224ab39e4ebbe41eb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Nov 2023 14:46:19 +0000 Subject: [PATCH 068/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 f8ed375..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d528bcf..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index c27e280..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 4edba667bfcae58ad9294909802e347e7190b0b1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 2 Nov 2023 14:49:09 +0000 Subject: [PATCH 069/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6220 insertions(+), 3684 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 4b492f5..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-11-01T03:08:10.618Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 e52e6af..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..d528bcf --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b11478d..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.1", - "@stdlib/streams-node-stdin": "^0.1.1", - "@stdlib/streams-node-stdout": "^0.1.1", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-define-nonenumerable-property": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-inherit": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.1", - "@stdlib/utils-noop": "^0.1.1", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..791e315 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f69ed61d31dca6a54120b6c5ff4e4c84c35a24dc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 21:25:33 +0000 Subject: [PATCH 070/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e02492..b11478d 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-define-nonenumerable-property": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-inherit": "^0.1.1", From e38aabc760daa99d04ad57625d2fb3b4811ef59f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Nov 2023 00:19:13 +0000 Subject: [PATCH 071/129] Remove files --- index.d.ts | 966 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7148 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 f8ed375..0000000 --- a/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d528bcf..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 791e315..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8038b48d2fa7a28fea3c96dbc2e00dcf4c90e736 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 4 Nov 2023 00:22:57 +0000 Subject: [PATCH 072/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6220 insertions(+), 3683 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 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 e52e6af..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..d528bcf --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index b11478d..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.1", - "@stdlib/streams-node-stdin": "^0.1.1", - "@stdlib/streams-node-stdout": "^0.1.1", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-define-nonenumerable-property": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-inherit": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.1", - "@stdlib/utils-noop": "^0.1.1", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8c95a27 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 45125957a6025511b6b6e899d4993e24554832eb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Dec 2023 07:22:03 +0000 Subject: [PATCH 073/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6fcf547..ce30aed 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-define-nonenumerable-property": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-inherit": "^0.1.1", From 528ab86cdc6545893f6a1f07566c398bc9e110d9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 02:35:21 +0000 Subject: [PATCH 074/129] Remove files --- index.d.ts | 965 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7147 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 e257410..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d528bcf..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8c95a27..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 65b55ccba3d9da6e1a10f6ef58358ce0bf19c6b9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 02:37:55 +0000 Subject: [PATCH 075/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6220 insertions(+), 3679 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 ea7519a..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-12-01T03:18:51.728Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 e52e6af..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..d528bcf --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index ce30aed..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.1", - "@stdlib/streams-node-stdin": "^0.1.1", - "@stdlib/streams-node-stdout": "^0.1.1", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/bench": "^0.2.1", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-define-nonenumerable-property": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-inherit": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.1", - "@stdlib/utils-noop": "^0.1.1", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..935ef1e --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ba067bee815705e1cd3799e72dd57fa3a990f453 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 04:39:20 +0000 Subject: [PATCH 076/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7da389c..c14de9c 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-define-nonenumerable-property": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-inherit": "^0.1.1", From e2f13e51cd75373450ac854c45c703fa6f1bcc2e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 10:56:32 +0000 Subject: [PATCH 077/129] Remove files --- index.d.ts | 965 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7147 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 e257410..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d528bcf..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 935ef1e..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 16f0ce22ef40e1fcabc3a9f2e879514a811f0b93 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 10:57:03 +0000 Subject: [PATCH 078/129] 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 | 73 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6220 insertions(+), 3685 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 12658fc..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-01-01T02:51:30.548Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 4a6b503..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: '27 15 * * 0' - - # 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 + + ```
@@ -137,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -199,37 +198,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 4fc6fdd..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[esm-url]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..1818874 --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index c14de9c..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.1", - "@stdlib/streams-node-stdin": "^0.1.1", - "@stdlib/streams-node-stdout": "^0.1.1", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-define-nonenumerable-property": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-inherit": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.1", - "@stdlib/utils-noop": "^0.1.1", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..c1042a6 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 19e2da886a342ca09f1dbdfda42cac585ae470f0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 05:07:05 +0000 Subject: [PATCH 079/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7da389c..c14de9c 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/utils-define-nonenumerable-property": "^0.1.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", "@stdlib/utils-inherit": "^0.1.1", From 73093fe09bc63fa75ee0726c1b1acee97de0bc4e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 10:22:06 +0000 Subject: [PATCH 080/129] Remove files --- index.d.ts | 965 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7147 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 e257410..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var randu = require( `@stdlib/random/iter/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( `@stdlib/random/iter/randu` ); - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * var Float64Array = require( `@stdlib/array/float64` ); - * var randu = require( `@stdlib/random/base/randu` ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( `@stdlib/streams/node/inspect-sink` ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( `@stdlib/streams/node/stdout` ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1818874..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index c1042a6..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 33d1949bb912ecd45cc0165cabad7e4233a26499 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 10:22:47 +0000 Subject: [PATCH 081/129] 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 | 75 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6220 insertions(+), 3690 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 d47ac5e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-02-01T03:26:41.427Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 4a6b503..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..1818874 --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index c14de9c..5c19e2c 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.1.0", - "@stdlib/streams-node-debug-sink": "^0.1.0", - "@stdlib/streams-node-empty": "^0.1.0", - "@stdlib/streams-node-from-array": "^0.1.0", - "@stdlib/streams-node-from-circular-array": "^0.1.0", - "@stdlib/streams-node-from-constant": "^0.1.0", - "@stdlib/streams-node-from-iterator": "^0.1.0", - "@stdlib/streams-node-from-strided-array": "^0.1.0", - "@stdlib/streams-node-inspect": "^0.1.0", - "@stdlib/streams-node-inspect-sink": "^0.1.0", - "@stdlib/streams-node-join": "^0.1.0", - "@stdlib/streams-node-split": "^0.1.0", - "@stdlib/streams-node-stderr": "^0.1.1", - "@stdlib/streams-node-stdin": "^0.1.1", - "@stdlib/streams-node-stdout": "^0.1.1", - "@stdlib/streams-node-transform": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.1.1", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.1.1", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.1.1", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.1.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.1.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1", - "@stdlib/utils-define-nonenumerable-property": "^0.1.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1", - "@stdlib/utils-inherit": "^0.1.1", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.1.1", - "@stdlib/utils-noop": "^0.1.1", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b8da542 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From aa3925d5d807c150781bde7de4f1230594e015dd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 09:06:37 +0000 Subject: [PATCH 082/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e68247e..77c0421 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.1.1", "@stdlib/random-base-randu": "^0.1.0", "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/string-format": "^0.2.0", + "@stdlib/error-tools-fmtprodmsg": "^0.2.0", "@stdlib/utils-define-nonenumerable-property": "^0.2.0", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", "@stdlib/utils-inherit": "^0.2.0", From d6ada56756114210a404e36bd3bf9708be4f9cce Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 17:52:55 +0000 Subject: [PATCH 083/129] Remove files --- index.d.ts | 965 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7147 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 1818874..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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.1.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.1.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index b50b2e0..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b8da542..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a035293294fbb766a254b8c320659c86899318ad Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 17:53:40 +0000 Subject: [PATCH 084/129] 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 | 75 +- 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 | 186 - package.json | 103 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6220 insertions(+), 3693 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 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 fcaaece..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..c875849 --- /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/streams-node-debug@v0.1.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.0-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.0-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.0-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.1.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",h),s(x,"stdin",f),s(x,"stdout",v),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..b50b2e0 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;s+GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 77c0421..0a0a1ab 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.0", - "@stdlib/streams-node-debug-sink": "^0.2.0", - "@stdlib/streams-node-empty": "^0.2.0", - "@stdlib/streams-node-from-array": "^0.2.0", - "@stdlib/streams-node-from-circular-array": "^0.2.0", - "@stdlib/streams-node-from-constant": "^0.2.0", - "@stdlib/streams-node-from-iterator": "^0.2.0", - "@stdlib/streams-node-from-strided-array": "^0.2.0", - "@stdlib/streams-node-inspect": "^0.2.0", - "@stdlib/streams-node-inspect-sink": "^0.2.0", - "@stdlib/streams-node-join": "^0.2.0", - "@stdlib/streams-node-split": "^0.2.0", - "@stdlib/streams-node-stderr": "^0.2.0", - "@stdlib/streams-node-stdin": "^0.2.0", - "@stdlib/streams-node-stdout": "^0.2.0", - "@stdlib/streams-node-transform": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.1.1", - "@stdlib/array-to-iterator": "^0.1.0", - "@stdlib/array-uint8": "^0.1.1", - "@stdlib/assert-has-own-property": "^0.1.1", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/assert-is-browser": "^0.1.1", - "@stdlib/assert-is-buffer": "^0.2.0", - "@stdlib/assert-is-collection": "^0.1.0", - "@stdlib/assert-is-error": "^0.1.1", - "@stdlib/assert-is-function": "^0.1.1", - "@stdlib/assert-is-integer": "^0.1.0", - "@stdlib/assert-is-iterator-like": "^0.2.0", - "@stdlib/assert-is-nonnegative-integer": "^0.1.0", - "@stdlib/assert-is-nonnegative-number": "^0.2.0", - "@stdlib/assert-is-plain-object": "^0.1.1", - "@stdlib/assert-is-regexp": "^0.1.1", - "@stdlib/assert-is-string": "^0.1.1", - "@stdlib/assert-is-uint8array": "^0.1.1", - "@stdlib/assert-is-windows": "^0.1.1", - "@stdlib/blas-base-gcopy": "^0.1.0", - "@stdlib/buffer-ctor": "^0.1.1", - "@stdlib/buffer-from-arraybuffer": "^0.2.0", - "@stdlib/buffer-from-string": "^0.1.1", - "@stdlib/fs-read-file": "^0.1.1", - "@stdlib/object-assign": "^0.2.0", - "@stdlib/process-exec-path": "^0.1.1", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/random-iter-randu": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.0", - "@stdlib/utils-define-nonenumerable-property": "^0.2.0", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0", - "@stdlib/utils-inherit": "^0.2.0", - "@stdlib/utils-keys": "^0.1.0", - "@stdlib/utils-next-tick": "^0.2.0", - "@stdlib/utils-noop": "^0.2.0", - "@stdlib/utils-parse-json": "^0.1.1", - "proxyquire": "^2.0.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..93de088 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3c78ad4186be725504aa5f10a439a85d2bf6bdf7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 14 Feb 2024 21:07:29 +0000 Subject: [PATCH 085/129] 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 bc05e26..af5eba9 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.2.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.2.0-esm/index.mjs'; ``` #### streams @@ -106,7 +106,7 @@ The package contains the following streams: - - - - From 18a04f215206b024bf8dabcdbbdb029c0ba62b0a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 24 Feb 2024 18:32:37 +0000 Subject: [PATCH 089/129] 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 | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4885 insertions(+), 3687 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 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..8a3331c --- /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/streams-node-debug@v0.2.0-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.0-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.0-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.0-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.0-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.0-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.0-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.0-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.0-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.0-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.0-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.0-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.0-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.0-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 95eee73..056d868 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.1", - "@stdlib/streams-node-debug-sink": "^0.2.1", - "@stdlib/streams-node-empty": "^0.2.1", - "@stdlib/streams-node-from-array": "^0.2.1", - "@stdlib/streams-node-from-circular-array": "^0.2.1", - "@stdlib/streams-node-from-constant": "^0.2.1", - "@stdlib/streams-node-from-iterator": "^0.2.1", - "@stdlib/streams-node-from-strided-array": "^0.2.1", - "@stdlib/streams-node-inspect": "^0.2.1", - "@stdlib/streams-node-inspect-sink": "^0.2.1", - "@stdlib/streams-node-join": "^0.2.1", - "@stdlib/streams-node-split": "^0.2.1", - "@stdlib/streams-node-stderr": "^0.2.1", - "@stdlib/streams-node-stdin": "^0.2.1", - "@stdlib/streams-node-stdout": "^0.2.1", - "@stdlib/streams-node-transform": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-to-iterator": "^0.2.0", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-browser": "^0.2.1", - "@stdlib/assert-is-buffer": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-error": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-integer": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.0", - "@stdlib/assert-is-nonnegative-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-regexp": "^0.2.1", - "@stdlib/assert-is-string": "^0.2.1", - "@stdlib/assert-is-uint8array": "^0.2.1", - "@stdlib/assert-is-windows": "^0.2.1", - "@stdlib/blas-base-gcopy": "^0.2.0", - "@stdlib/buffer-ctor": "^0.2.1", - "@stdlib/buffer-from-arraybuffer": "^0.2.1", - "@stdlib/buffer-from-string": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/object-assign": "^0.2.1", - "@stdlib/process-exec-path": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.0", - "@stdlib/random-iter-randu": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-define-nonenumerable-property": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-inherit": "^0.2.1", - "@stdlib/utils-keys": "^0.2.0", - "@stdlib/utils-next-tick": "^0.2.1", - "@stdlib/utils-noop": "^0.2.1", - "@stdlib/utils-parse-json": "^0.2.1", - "proxyquire": "^2.0.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", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a62036a --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ac7b738c073301c9afeb2083cb1059ffaa8dfe7a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 24 Feb 2024 19:12:01 +0000 Subject: [PATCH 090/129] 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 6346f36..0d0d184 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.2.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.2.1-esm/index.mjs'; ``` #### streams @@ -106,7 +106,7 @@ The package contains the following streams: - - - - From a15e84c6fd090be3a6d0403e36f4ecf4a688438f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 09:02:58 +0000 Subject: [PATCH 094/129] 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 | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 3689 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 d2a8622..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-03-01T03:22:54.186Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..cc45b83 --- /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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index de7a79b..056d868 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.1", - "@stdlib/streams-node-debug-sink": "^0.2.1", - "@stdlib/streams-node-empty": "^0.2.1", - "@stdlib/streams-node-from-array": "^0.2.1", - "@stdlib/streams-node-from-circular-array": "^0.2.1", - "@stdlib/streams-node-from-constant": "^0.2.1", - "@stdlib/streams-node-from-iterator": "^0.2.1", - "@stdlib/streams-node-from-strided-array": "^0.2.1", - "@stdlib/streams-node-inspect": "^0.2.1", - "@stdlib/streams-node-inspect-sink": "^0.2.1", - "@stdlib/streams-node-join": "^0.2.1", - "@stdlib/streams-node-split": "^0.2.1", - "@stdlib/streams-node-stderr": "^0.2.1", - "@stdlib/streams-node-stdin": "^0.2.1", - "@stdlib/streams-node-stdout": "^0.2.1", - "@stdlib/streams-node-transform": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-to-iterator": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-browser": "^0.2.1", - "@stdlib/assert-is-buffer": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-error": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-integer": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-regexp": "^0.2.1", - "@stdlib/assert-is-string": "^0.2.1", - "@stdlib/assert-is-uint8array": "^0.2.1", - "@stdlib/assert-is-windows": "^0.2.1", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.1", - "@stdlib/buffer-from-arraybuffer": "^0.2.1", - "@stdlib/buffer-from-string": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/object-assign": "^0.2.1", - "@stdlib/process-exec-path": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-define-nonenumerable-property": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-inherit": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "@stdlib/utils-next-tick": "^0.2.1", - "@stdlib/utils-noop": "^0.2.1", - "@stdlib/utils-parse-json": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..746a8cf --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b2f76ee1c799cad06485cc2ea08919c37b0742cf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 04:07:53 +0000 Subject: [PATCH 095/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 635f5b3..de7a79b 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-define-nonenumerable-property": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-inherit": "^0.2.1", From 3c52ed3233a2376e37f30a4e4472046402bfd451 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 08:47:28 +0000 Subject: [PATCH 096/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index cc45b83..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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 746a8cf..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ffab33ab3e712a1382a2af9a5baef57db295840e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 08:47:51 +0000 Subject: [PATCH 097/129] 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 | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 3692 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 3a5bf68..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-04-01T02:46:18.269Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..cc45b83 --- /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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index de7a79b..056d868 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.1", - "@stdlib/streams-node-debug-sink": "^0.2.1", - "@stdlib/streams-node-empty": "^0.2.1", - "@stdlib/streams-node-from-array": "^0.2.1", - "@stdlib/streams-node-from-circular-array": "^0.2.1", - "@stdlib/streams-node-from-constant": "^0.2.1", - "@stdlib/streams-node-from-iterator": "^0.2.1", - "@stdlib/streams-node-from-strided-array": "^0.2.1", - "@stdlib/streams-node-inspect": "^0.2.1", - "@stdlib/streams-node-inspect-sink": "^0.2.1", - "@stdlib/streams-node-join": "^0.2.1", - "@stdlib/streams-node-split": "^0.2.1", - "@stdlib/streams-node-stderr": "^0.2.1", - "@stdlib/streams-node-stdin": "^0.2.1", - "@stdlib/streams-node-stdout": "^0.2.1", - "@stdlib/streams-node-transform": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-to-iterator": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-browser": "^0.2.1", - "@stdlib/assert-is-buffer": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-error": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-integer": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-regexp": "^0.2.1", - "@stdlib/assert-is-string": "^0.2.1", - "@stdlib/assert-is-uint8array": "^0.2.1", - "@stdlib/assert-is-windows": "^0.2.1", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.1", - "@stdlib/buffer-from-arraybuffer": "^0.2.1", - "@stdlib/buffer-from-string": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/object-assign": "^0.2.1", - "@stdlib/process-exec-path": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-define-nonenumerable-property": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-inherit": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "@stdlib/utils-next-tick": "^0.2.1", - "@stdlib/utils-noop": "^0.2.1", - "@stdlib/utils-parse-json": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..746a8cf --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 76e8cd4935c81923078c76e05779d1e3a0d1e90a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 00:19:01 +0000 Subject: [PATCH 098/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 635f5b3..de7a79b 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/utils-define-nonenumerable-property": "^0.2.1", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-inherit": "^0.2.1", From c28407610e85ecc42c78d27a24114d20e03e2537 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 05:25:59 +0000 Subject: [PATCH 099/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index cc45b83..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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 746a8cf..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 2c8e726906a3d0daa0a7390ac580c625b0673117 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 05:26:24 +0000 Subject: [PATCH 100/129] 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 | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4885 insertions(+), 3693 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 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..cc45b83 --- /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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index de7a79b..056d868 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.1", - "@stdlib/streams-node-debug-sink": "^0.2.1", - "@stdlib/streams-node-empty": "^0.2.1", - "@stdlib/streams-node-from-array": "^0.2.1", - "@stdlib/streams-node-from-circular-array": "^0.2.1", - "@stdlib/streams-node-from-constant": "^0.2.1", - "@stdlib/streams-node-from-iterator": "^0.2.1", - "@stdlib/streams-node-from-strided-array": "^0.2.1", - "@stdlib/streams-node-inspect": "^0.2.1", - "@stdlib/streams-node-inspect-sink": "^0.2.1", - "@stdlib/streams-node-join": "^0.2.1", - "@stdlib/streams-node-split": "^0.2.1", - "@stdlib/streams-node-stderr": "^0.2.1", - "@stdlib/streams-node-stdin": "^0.2.1", - "@stdlib/streams-node-stdout": "^0.2.1", - "@stdlib/streams-node-transform": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.1", - "@stdlib/array-to-iterator": "^0.2.1", - "@stdlib/array-uint8": "^0.2.1", - "@stdlib/assert-has-own-property": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/assert-is-browser": "^0.2.1", - "@stdlib/assert-is-buffer": "^0.2.1", - "@stdlib/assert-is-collection": "^0.2.1", - "@stdlib/assert-is-error": "^0.2.1", - "@stdlib/assert-is-function": "^0.2.1", - "@stdlib/assert-is-integer": "^0.2.1", - "@stdlib/assert-is-iterator-like": "^0.2.1", - "@stdlib/assert-is-nonnegative-integer": "^0.2.1", - "@stdlib/assert-is-nonnegative-number": "^0.2.1", - "@stdlib/assert-is-plain-object": "^0.2.1", - "@stdlib/assert-is-regexp": "^0.2.1", - "@stdlib/assert-is-string": "^0.2.1", - "@stdlib/assert-is-uint8array": "^0.2.1", - "@stdlib/assert-is-windows": "^0.2.1", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.1", - "@stdlib/buffer-from-arraybuffer": "^0.2.1", - "@stdlib/buffer-from-string": "^0.2.1", - "@stdlib/fs-read-file": "^0.2.1", - "@stdlib/object-assign": "^0.2.1", - "@stdlib/process-exec-path": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1", - "@stdlib/utils-define-nonenumerable-property": "^0.2.1", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", - "@stdlib/utils-inherit": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "@stdlib/utils-next-tick": "^0.2.1", - "@stdlib/utils-noop": "^0.2.1", - "@stdlib/utils-parse-json": "^0.2.1", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..746a8cf --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9426462d153ba4d5d717bee173700824e65b8679 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:29:32 +0000 Subject: [PATCH 101/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9128b4a..2310dbf 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From 3423a7fe44fad3f2dc7b9e78ccf8ced419ee7c0f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:37:11 +0000 Subject: [PATCH 102/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index cc45b83..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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.1-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 746a8cf..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 82ea3ea98a625cac6eabb89e1a6e61fb1fbd0667 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:37:34 +0000 Subject: [PATCH 103/129] 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 | 1212 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4885 insertions(+), 4911 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 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..6eb43a1 --- /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/streams-node-debug@v0.2.1-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.1-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index 2310dbf..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.1", - "@stdlib/streams-node-debug-sink": "^0.2.1", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.1", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..3e4e454 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0be8a8b18b8a3c1dbe90e89be8f43baf76c37f02 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 01:39:34 +0000 Subject: [PATCH 104/129] Update README.md for ESM bundle v0.2.2 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fa8d92d..6b137f7 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import streams from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.2.2-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@esm/index.mjs'; +import { arrayStream, circularArrayStream, constantStream, debugSinkStream, debugStream, emptyStream, inspectSinkStream, inspectStream, iteratorStream, joinStream, splitStream, stderr, stdin, stdout, stridedArrayStream, transformStream } from 'https://cdn.jsdelivr.net/gh/stdlib-js/streams-node@v0.2.2-esm/index.mjs'; ``` #### streams @@ -106,7 +106,7 @@ The package contains the following streams: - - - - From 4110baddba3b655cdcf9f56de41376c059626336 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Aug 2024 08:49:17 +0000 Subject: [PATCH 108/129] 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 | 266 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 3968 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 fd67ce6..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-08-01T03:23:13.826Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 24d5ccde88423298ce7a7f29b3cdd560a26ffc58 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 3 Aug 2024 19:36:32 +0000 Subject: [PATCH 109/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From dc26a72fc27bea4df0e23f24da312904febf5456 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 3 Aug 2024 22:46:23 +0000 Subject: [PATCH 110/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6bada9328566374e535a3350c81343797718a652 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 3 Aug 2024 22:46:51 +0000 Subject: [PATCH 111/129] 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 | 1234 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 4936 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 9de6648..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-08-03T18:33:47.334Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From fddef13a305ae6a5752b97694657416bcb808ca4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 04:51:05 +0000 Subject: [PATCH 112/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From a8235981b4d731a5ca776bbe280ea810275ad029 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 08:50:34 +0000 Subject: [PATCH 113/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 10c4cdf5c640392794c3c1b19e20a659c9f31965 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 08:50:55 +0000 Subject: [PATCH 114/129] 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 | 979 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 4681 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 4c86add..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-09-01T03:35:45.046Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From a16df407b7460f31033fb95b64cce1f3f350b49d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Oct 2024 05:00:38 +0000 Subject: [PATCH 115/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From eb6d2c2ea4014ef838ed3bf0c699397ffbc8e6f0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Oct 2024 08:57:54 +0000 Subject: [PATCH 116/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From c36dc5c2d1a7b13554ac83d0df7754934bf0bf4c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Oct 2024 08:58:15 +0000 Subject: [PATCH 117/129] 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 | 979 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 4681 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 dc06f80..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T03:45:36.482Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5e51cad6432745e39042137bd72688456bf0931b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Nov 2024 04:56:04 +0000 Subject: [PATCH 118/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From f79c7bc2034621055c52ed6d4f74717480b039c2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Nov 2024 08:23:40 +0000 Subject: [PATCH 119/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 38d5adbb956ddade36bf786aa88bcf4fc9b5aa06 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Nov 2024 08:24:06 +0000 Subject: [PATCH 120/129] 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 | 979 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4885 insertions(+), 4681 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 7685254..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-11-01T03:48:52.815Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From b4f2e8c39448f2b35d19fb33c2d773cba374056d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 05:12:14 +0000 Subject: [PATCH 121/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From 815bf2d0434529f1182bd35a5fd628353c885088 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 08:59:13 +0000 Subject: [PATCH 122/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8c81335676ab3928c8492a0ec73b80a54c301bc8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 08:59:35 +0000 Subject: [PATCH 123/129] 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 | 979 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4885 insertions(+), 4786 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 b8c9319..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-12-01T03:53:43.546Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6784da2085e640eb8de1e24b9137344ca53a0547 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 23 Dec 2024 02:10:43 +0000 Subject: [PATCH 124/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From f71467e08557f8ff70cec1f47559a0c7ef96d857 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 23 Dec 2024 02:35:02 +0000 Subject: [PATCH 125/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8c51baf09a6f24d7b87672571699a2e91d84a04c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 23 Dec 2024 02:35:32 +0000 Subject: [PATCH 126/129] 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 | 979 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4885 insertions(+), 4786 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 0779e8a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 51766c5..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-12-23T02:01:52.531Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4ee6a31..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/streams/node) 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 ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..10b3353 --- /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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 2b0ff5d632360cf6ba971dd27f491c5fb72f4338 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 7 Apr 2025 01:47:56 +0000 Subject: [PATCH 127/129] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 245f311..cd6da20 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@stdlib/process-exec-path": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-nonenumerable-property": "^0.2.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", "@stdlib/utils-inherit": "^0.2.2", From 4c34bb80fc07710547daf2f2927bc3716add9d98 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 7 Apr 2025 01:57:14 +0000 Subject: [PATCH 128/129] Remove files --- index.d.ts | 965 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5812 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 1f072cb..0000000 --- a/index.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2021 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 debugStream = require( '@stdlib/streams-node-debug' ); -import debugSinkStream = require( '@stdlib/streams-node-debug-sink' ); -import emptyStream = require( '@stdlib/streams-node-empty' ); -import arrayStream = require( '@stdlib/streams-node-from-array' ); -import circularArrayStream = require( '@stdlib/streams-node-from-circular-array' ); -import constantStream = require( '@stdlib/streams-node-from-constant' ); -import iteratorStream = require( '@stdlib/streams-node-from-iterator' ); -import stridedArrayStream = require( '@stdlib/streams-node-from-strided-array' ); -import inspectStream = require( '@stdlib/streams-node-inspect' ); -import inspectSinkStream = require( '@stdlib/streams-node-inspect-sink' ); -import joinStream = require( '@stdlib/streams-node-join' ); -import splitStream = require( '@stdlib/streams-node-split' ); -import stderr = require( '@stdlib/streams-node-stderr' ); -import stdin = require( '@stdlib/streams-node-stdin' ); -import stdout = require( '@stdlib/streams-node-stdout' ); -import transformStream = require( '@stdlib/streams-node-transform' ); - -/** -* Interface describing the `node` namespace. -*/ -interface Namespace { - /** - * Returns a debug stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugStream = ns.debugStream; - * var stream = new DebugStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * - * @example - * var stream = ns.debugStream.objectMode(); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugStream: typeof debugStream; - - /** - * Returns an debug sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var DebugSinkStream = ns.debugSinkStream; - * var stream = new DebugSinkStream({ - * 'name': 'my-stream' - * }); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * stream.end(); - * - * @example - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.debugSinkStream.factory( opts ); - * - * // Assign each stream to a separate debug namespace... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( 'stream '+i ) ); - * } - * @example - * var stream = ns.debugSinkStream.objectMode({ - * 'name': 'my-stream' - * }); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * stream.end(); - */ - debugSinkStream: typeof debugSinkStream; - - /** - * Returns an "empty" stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var EmptyStream = ns.emptyStream; - * var stream = new EmptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.emptyStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'objectMode': false - * }; - * - * var createStream = ns.emptyStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var stream = ns.emptyStream.objectMode(); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - emptyStream: typeof emptyStream; - - /** - * Creates a readable stream from an array-like object. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var ArrayStream = ns.arrayStream; - * var stream = new ArrayStream( arr ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.arrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.arrayStream.objectMode( arr ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - arrayStream: typeof arrayStream; - - /** - * Creates a readable stream from an array-like object which repeatedly iterates over a provided value's elements. - * - * @param src - source array-like object - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var CircularArrayStream = ns.circularArrayStream; - * var stream = new CircularArrayStream( arr, opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.circularArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'iter': arr.length * 2 - * }; - * - * var stream = ns.circularArrayStream.objectMode( arr, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - circularArrayStream: typeof circularArrayStream; - - /** - * Returns a readable stream which always streams the same value. - * - * @param value - value to stream - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var ConstantStream = ns.constantStream; - * var stream = new ConstantStream( 'beep', opts ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.constantStream.factory( 'beep', opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.constantStream.objectMode( 3.14, opts ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - constantStream: typeof constantStream; - - /** - * Creates a readable stream from an iterator. - * - * @param iterator - source iterator - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var randu = require( '@stdlib/random-iter-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var IteratorStream = ns.iteratorStream; - * var stream = new IteratorStream( randu( opts ) ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.iteratorStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( randu() ) ); - * } - * - * @example - * var randu = require( '@stdlib/random-iter-randu' ); - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var opts = { - * 'iter': 10 - * }; - * - * var stream = ns.iteratorStream.objectMode( randu( opts ) ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - iteratorStream: typeof iteratorStream; - - /** - * Creates a readable stream from a strided array-like object. - * - * @param N - number of values to stream - * @param buffer - source value - * @param stride - stride length - * @param offset - starting index - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var StridedArrayStream = ns.stridedArrayStream; - * var stream = new StridedArrayStream( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream( log ) ); - * - * @example - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var opts = { - * 'sep': ',', - * 'objectMode': false, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var createStream = ns.stridedArrayStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * for ( i = 0; i < 10; i++ ) { - * streams.push( createStream( arr.length, arr, 1, 0 ) ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * var Float64Array = require( '@stdlib/array-float64' ); - * var randu = require( '@stdlib/random-base-randu' ); - * - * function log( v ) { - * console.log( v ); - * } - * - * var arr = new Float64Array( 10 ); - * var i; - * for ( i = 0; i < arr.length; i++ ) { - * arr[ i ] = randu(); - * } - * - * var stream = ns.stridedArrayStream.objectMode( arr.length, arr, 1, 0 ); - * - * stream.pipe( inspectStream.objectMode( log ) ); - */ - stridedArrayStream: typeof stridedArrayStream; - - /** - * Returns an inspect stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectStream = ns.inspectStream; - * var stream = new InspectStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: {'value': 'a'} - * // prints: index: 1 - * // prints: {'value': 'b'} - * // prints: index: 2 - * // prints: {'value': 'c'} - */ - inspectStream: typeof inspectStream; - - /** - * Returns an inspect sink stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var InspectSinkStream = ns.inspectSinkStream; - * var stream = new InspectSinkStream( {}, log ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: index: 0 - * // prints: a - * // prints: index: 1 - * // prints: b - * // prints: index: 2 - * // prints: c - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var opts = { - * 'objectMode': true, - * 'highWaterMark': 64 - * }; - * - * var factory = ns.inspectSinkStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( log ) ); - * } - * - * @example - * function log( chunk, idx ) { - * console.log( 'index: %d', idx ); - * console.log( chunk ); - * } - * - * var stream = ns.inspectSinkStream.objectMode( {}, log ); - * - * stream.write( {'value': 'a'} ); - * stream.write( {'value': 'b'} ); - * stream.write( {'value': 'c'} ); - * - * stream.end(); - * - * // prints: 'index: 0' - * // prints: {'value': 'a'} - * // prints: 'index: 1' - * // prints: {'value': 'b'} - * // prints: 'index: 2' - * // prints: {'value': 'c'} - */ - inspectSinkStream: typeof inspectSinkStream; - - /** - * Returns a join stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var JoinStream = ns.joinStream; - * var stream = new JoinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3' - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk ); - * } - * - * var stream = ns.joinStream(); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3'; - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64 - * }; - * - * var factory = ns.joinStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var inspectStream = require( '@stdlib/streams-node-inspect-sink' ); - * - * function log( chunk ) { - * console.log( chunk.toString() ); - * } - * - * var stream = ns.joinStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.pipe( inspectStream( log ) ); - * - * stream.write( 'a' ); - * stream.write( 'b' ); - * stream.write( 'c' ); - * - * stream.end(); - * - * // prints: 'a,b,c' - */ - joinStream: typeof joinStream; - - /** - * Returns a split stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var SplitStream = ns.splitStream; - * var stream = new SplitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var stream = ns.splitStream(); - * - * stream.write( '1\n2\n3' ); - * stream.end(); - * - * @example - * var opts = { - * 'sep': '\t', - * 'objectMode': true, - * 'encoding': 'utf8' - * }; - * - * var factory = ns.splitStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory() ); - * } - * - * @example - * var stream = ns.splitStream.objectMode({ - * 'sep': ',' - * }); - * - * stream.write( 'a,b,c' ); - * stream.end(); - */ - splitStream: typeof splitStream; - - /** - * Standard error. - */ - stderr: typeof stderr; - - /** - * Standard input. - */ - stdin: typeof stdin; - - /** - * Standard output. - */ - stdout: typeof stdout; - - /** - * Returns a transform stream. - * - * @param options - stream options - * @throws must provide valid options - * @returns stream instance - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var TransformStream = ns.transformStream; - * var stream = new TransformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'transform': transform - * }; - * var stream = ns.transformStream( opts ); - * - * stream.pipe( stdout ); - * - * stream.write( '1' ); - * stream.write( '2' ); - * stream.write( '3' ); - * - * stream.end(); - * - * // prints: '1\n2\n3\n' - * - * @example - * function transform( chunk, enc, clbk ) { - * clbk( null, chunk.toString()+'\n' ); - * } - * - * var opts = { - * 'objectMode': true, - * 'encoding': 'utf8', - * 'highWaterMark': 64, - * 'decodeStrings': false - * }; - * - * var factory = ns.transformStream.factory( opts ); - * - * // Create 10 identically configured streams... - * var streams = []; - * var i; - * for ( i = 0; i < 10; i++ ) { - * streams.push( factory( transform ) ); - * } - * - * @example - * var stdout = require( '@stdlib/streams-node-stdout' ); - * - * function stringify( chunk, enc, clbk ) { - * clbk( null, JSON.stringify( chunk ) ); - * } - * - * function newline( chunk, enc, clbk ) { - * clbk( null, chunk+'\n' ); - * } - * - * var s1 = ns.transformStream.objectMode({ - * 'transform': stringify - * }); - * - * var s2 = ns.transformStream.objectMode({ - * 'transform': newline - * }); - * - * s1.pipe( s2 ).pipe( stdout ); - * - * s1.write( {'value': 'a'} ); - * s1.write( {'value': 'b'} ); - * s1.write( {'value': 'c'} ); - * - * s1.end(); - * - * // prints: '{"value":"a"}\n{"value":"b"}\n{"value":"c"}\n' - */ - transformStream: typeof transformStream; -} - -/** -* Node.js streams. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 10b3353..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/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 5462e14..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5d24857..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 125edc9674dcbe2f695f4fa6081d3c90fee796aa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 7 Apr 2025 01:57:41 +0000 Subject: [PATCH 129/129] Auto-generated commit --- .editorconfig | 180 - .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 | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 979 ---- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 75 +- 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 | 186 - package.json | 103 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 41 files changed, 4885 insertions(+), 4789 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 dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index ef65cf0..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2025-04-07T01:38:31.602Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index acc1054..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/streams/node) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index ccaa93b..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/streams/node) 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 666d0fa..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: '27 15 * * 0' - - # 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 + + ```
@@ -139,7 +136,7 @@ console.log( getKeys( streams ) ); ## 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]. @@ -204,37 +201,37 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink +[@stdlib/streams/node/debug-sink]: https://github.com/stdlib-js/streams-node-debug-sink/tree/esm -[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug +[@stdlib/streams/node/debug]: https://github.com/stdlib-js/streams-node-debug/tree/esm -[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty +[@stdlib/streams/node/empty]: https://github.com/stdlib-js/streams-node-empty/tree/esm -[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array +[@stdlib/streams/node/from-array]: https://github.com/stdlib-js/streams-node-from-array/tree/esm -[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array +[@stdlib/streams/node/from-circular-array]: https://github.com/stdlib-js/streams-node-from-circular-array/tree/esm -[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant +[@stdlib/streams/node/from-constant]: https://github.com/stdlib-js/streams-node-from-constant/tree/esm -[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator +[@stdlib/streams/node/from-iterator]: https://github.com/stdlib-js/streams-node-from-iterator/tree/esm -[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array +[@stdlib/streams/node/from-strided-array]: https://github.com/stdlib-js/streams-node-from-strided-array/tree/esm -[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink +[@stdlib/streams/node/inspect-sink]: https://github.com/stdlib-js/streams-node-inspect-sink/tree/esm -[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect +[@stdlib/streams/node/inspect]: https://github.com/stdlib-js/streams-node-inspect/tree/esm -[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join +[@stdlib/streams/node/join]: https://github.com/stdlib-js/streams-node-join/tree/esm -[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split +[@stdlib/streams/node/split]: https://github.com/stdlib-js/streams-node-split/tree/esm -[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr +[@stdlib/streams/node/stderr]: https://github.com/stdlib-js/streams-node-stderr/tree/esm -[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin +[@stdlib/streams/node/stdin]: https://github.com/stdlib-js/streams-node-stdin/tree/esm -[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout +[@stdlib/streams/node/stdout]: https://github.com/stdlib-js/streams-node-stdout/tree/esm -[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform +[@stdlib/streams/node/transform]: https://github.com/stdlib-js/streams-node-transform/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 aac1126..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/streams/node" -%% click B href "https://github.com/stdlib-js/streams-node/tree/main" -%% click C href "https://github.com/stdlib-js/streams-node/tree/production" -%% click D href "https://github.com/stdlib-js/streams-node/tree/esm" -%% click E href "https://github.com/stdlib-js/streams-node/tree/deno" -%% click F href "https://github.com/stdlib-js/streams-node/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/streams/node -[production-url]: https://github.com/stdlib-js/streams-node/tree/production -[deno-url]: https://github.com/stdlib-js/streams-node/tree/deno -[deno-readme]: https://github.com/stdlib-js/streams-node/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/streams-node/tree/umd -[umd-readme]: https://github.com/stdlib-js/streams-node/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/streams-node/tree/esm -[esm-readme]: https://github.com/stdlib-js/streams-node/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 0e8ca06..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"debugStream",require('@stdlib/streams-node-debug/dist'));e(r,"debugSinkStream",require('@stdlib/streams-node-debug-sink/dist'));e(r,"emptyStream",require('@stdlib/streams-node-empty/dist'));e(r,"arrayStream",require('@stdlib/streams-node-from-array/dist'));e(r,"circularArrayStream",require('@stdlib/streams-node-from-circular-array/dist'));e(r,"constantStream",require('@stdlib/streams-node-from-constant/dist'));e(r,"iteratorStream",require('@stdlib/streams-node-from-iterator/dist'));e(r,"stridedArrayStream",require('@stdlib/streams-node-from-strided-array/dist'));e(r,"inspectStream",require('@stdlib/streams-node-inspect/dist'));e(r,"inspectSinkStream",require('@stdlib/streams-node-inspect-sink/dist'));e(r,"joinStream",require('@stdlib/streams-node-join/dist'));e(r,"splitStream",require('@stdlib/streams-node-split/dist'));e(r,"stderr",require('@stdlib/streams-node-stderr/dist'));e(r,"stdin",require('@stdlib/streams-node-stdin/dist'));e(r,"stdout",require('@stdlib/streams-node-stdout/dist'));e(r,"transformStream",require('@stdlib/streams-node-transform/dist'));module.exports=r; -/** @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 0df7f0b..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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nsetReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nsetReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nsetReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nsetReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nsetReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nsetReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nsetReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nsetReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nsetReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nsetReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nsetReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nsetReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nsetReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nsetReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nsetReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nsetReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) );\n\n\n// EXPORTS //\n\nmodule.exports = streams;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAU,CAAC,EASfD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,kBAAmB,QAAS,iCAAkC,CAAE,EAStFD,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,cAAe,QAAS,iCAAkC,CAAE,EASlFD,EAAaC,EAAS,sBAAuB,QAAS,0CAA2C,CAAE,EASnGD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,iBAAkB,QAAS,oCAAqC,CAAE,EASxFD,EAAaC,EAAS,qBAAsB,QAAS,yCAA0C,CAAE,EASjGD,EAAaC,EAAS,gBAAiB,QAAS,8BAA+B,CAAE,EASjFD,EAAaC,EAAS,oBAAqB,QAAS,mCAAoC,CAAE,EAS1FD,EAAaC,EAAS,aAAc,QAAS,2BAA4B,CAAE,EAS3ED,EAAaC,EAAS,cAAe,QAAS,4BAA6B,CAAE,EAS7ED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,QAAS,QAAS,4BAA6B,CAAE,EASvED,EAAaC,EAAS,SAAU,QAAS,6BAA8B,CAAE,EASzED,EAAaC,EAAS,kBAAmB,QAAS,gCAAiC,CAAE,EAKrF,OAAO,QAAUA", - "names": ["setReadOnly", "streams"] -} 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 73dd12f..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 streams = require( './../lib' ); - -console.log( objectKeys( streams ) ); 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..2fe5c9d --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";export{default as debugStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";export{default as debugSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-debug-sink@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";export{default as emptyStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-empty@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";export{default as arrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-array@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";export{default as circularArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-circular-array@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";export{default as constantStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-constant@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";export{default as iteratorStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-iterator@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";export{default as stridedArrayStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-from-strided-array@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";export{default as inspectStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";export{default as inspectSinkStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-inspect-sink@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";export{default as joinStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-join@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";export{default as splitStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-split@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";export{default as stderr}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stderr@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";export{default as stdin}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdin@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";export{default as stdout}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-stdout@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";export{default as transformStream}from"https://cdn.jsdelivr.net/gh/stdlib-js/streams-node-transform@v0.2.2-esm/index.mjs";var x={};s(x,"debugStream",t),s(x,"debugSinkStream",e),s(x,"emptyStream",r),s(x,"arrayStream",d),s(x,"circularArrayStream",m),s(x,"constantStream",n),s(x,"iteratorStream",i),s(x,"stridedArrayStream",o),s(x,"inspectStream",a),s(x,"inspectSinkStream",j),s(x,"joinStream",l),s(x,"splitStream",p),s(x,"stderr",v),s(x,"stdin",h),s(x,"stdout",f),s(x,"transformStream",c);export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..5462e14 --- /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 streams\n*/\nvar streams = {};\n\n/**\n* @name debugStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug}\n*/\nimport debugStream from '@stdlib/streams-node-debug';\nsetReadOnly( streams, 'debugStream', debugStream );\n\n/**\n* @name debugSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/debug-sink}\n*/\nimport debugSinkStream from '@stdlib/streams-node-debug-sink';\nsetReadOnly( streams, 'debugSinkStream', debugSinkStream );\n\n/**\n* @name emptyStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/empty}\n*/\nimport emptyStream from '@stdlib/streams-node-empty';\nsetReadOnly( streams, 'emptyStream', emptyStream );\n\n/**\n* @name arrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-array}\n*/\nimport arrayStream from '@stdlib/streams-node-from-array';\nsetReadOnly( streams, 'arrayStream', arrayStream );\n\n/**\n* @name circularArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-circular-array}\n*/\nimport circularArrayStream from '@stdlib/streams-node-from-circular-array';\nsetReadOnly( streams, 'circularArrayStream', circularArrayStream );\n\n/**\n* @name constantStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-constant}\n*/\nimport constantStream from '@stdlib/streams-node-from-constant';\nsetReadOnly( streams, 'constantStream', constantStream );\n\n/**\n* @name iteratorStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-iterator}\n*/\nimport iteratorStream from '@stdlib/streams-node-from-iterator';\nsetReadOnly( streams, 'iteratorStream', iteratorStream );\n\n/**\n* @name stridedArrayStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/from-strided-array}\n*/\nimport stridedArrayStream from '@stdlib/streams-node-from-strided-array';\nsetReadOnly( streams, 'stridedArrayStream', stridedArrayStream );\n\n/**\n* @name inspectStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect}\n*/\nimport inspectStream from '@stdlib/streams-node-inspect';\nsetReadOnly( streams, 'inspectStream', inspectStream );\n\n/**\n* @name inspectSinkStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/inspect-sink}\n*/\nimport inspectSinkStream from '@stdlib/streams-node-inspect-sink';\nsetReadOnly( streams, 'inspectSinkStream', inspectSinkStream );\n\n/**\n* @name joinStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/join}\n*/\nimport joinStream from '@stdlib/streams-node-join';\nsetReadOnly( streams, 'joinStream', joinStream );\n\n/**\n* @name splitStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/split}\n*/\nimport splitStream from '@stdlib/streams-node-split';\nsetReadOnly( streams, 'splitStream', splitStream );\n\n/**\n* @name stderr\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stderr}\n*/\nimport stderr from '@stdlib/streams-node-stderr';\nsetReadOnly( streams, 'stderr', stderr );\n\n/**\n* @name stdin\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdin}\n*/\nimport stdin from '@stdlib/streams-node-stdin';\nsetReadOnly( streams, 'stdin', stdin );\n\n/**\n* @name stdout\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/stdout}\n*/\nimport stdout from '@stdlib/streams-node-stdout';\nsetReadOnly( streams, 'stdout', stdout );\n\n/**\n* @name transformStream\n* @memberof streams\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/streams/node/transform}\n*/\nimport transformStream from '@stdlib/streams-node-transform';\nsetReadOnly( streams, 'transformStream', transformStream );\n\n\n// EXPORTS //\n\nexport default streams;\n"],"names":["streams","setReadOnly","debugStream","debugSinkStream","emptyStream","arrayStream","circularArrayStream","constantStream","iteratorStream","stridedArrayStream","inspectStream","inspectSinkStream","joinStream","splitStream","stderr","stdin","stdout","transformStream"],"mappings":";;o/GAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,cAAAE,GAUAD,EAAAD,EAAA,kBAAAG,GAUAF,EAAAD,EAAA,cAAAI,GAUAH,EAAAD,EAAA,cAAAK,GAUAJ,EAAAD,EAAA,sBAAAM,GAUAL,EAAAD,EAAA,iBAAAO,GAUAN,EAAAD,EAAA,iBAAAQ,GAUAP,EAAAD,EAAA,qBAAAS,GAUAR,EAAAD,EAAA,gBAAAU,GAUAT,EAAAD,EAAA,oBAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,cAAAa,GAUAZ,EAAAD,EAAA,SAAAc,GAUAb,EAAAD,EAAA,QAAAe,GAUAd,EAAAD,EAAA,SAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb5b6e9..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace streams -*/ -var streams = {}; - -/** -* @name debugStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug} -*/ -setReadOnly( streams, 'debugStream', require( '@stdlib/streams-node-debug' ) ); - -/** -* @name debugSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/debug-sink} -*/ -setReadOnly( streams, 'debugSinkStream', require( '@stdlib/streams-node-debug-sink' ) ); - -/** -* @name emptyStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/empty} -*/ -setReadOnly( streams, 'emptyStream', require( '@stdlib/streams-node-empty' ) ); - -/** -* @name arrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-array} -*/ -setReadOnly( streams, 'arrayStream', require( '@stdlib/streams-node-from-array' ) ); - -/** -* @name circularArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-circular-array} -*/ -setReadOnly( streams, 'circularArrayStream', require( '@stdlib/streams-node-from-circular-array' ) ); - -/** -* @name constantStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-constant} -*/ -setReadOnly( streams, 'constantStream', require( '@stdlib/streams-node-from-constant' ) ); - -/** -* @name iteratorStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-iterator} -*/ -setReadOnly( streams, 'iteratorStream', require( '@stdlib/streams-node-from-iterator' ) ); - -/** -* @name stridedArrayStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/from-strided-array} -*/ -setReadOnly( streams, 'stridedArrayStream', require( '@stdlib/streams-node-from-strided-array' ) ); - -/** -* @name inspectStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect} -*/ -setReadOnly( streams, 'inspectStream', require( '@stdlib/streams-node-inspect' ) ); - -/** -* @name inspectSinkStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/inspect-sink} -*/ -setReadOnly( streams, 'inspectSinkStream', require( '@stdlib/streams-node-inspect-sink' ) ); - -/** -* @name joinStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/join} -*/ -setReadOnly( streams, 'joinStream', require( '@stdlib/streams-node-join' ) ); - -/** -* @name splitStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/split} -*/ -setReadOnly( streams, 'splitStream', require( '@stdlib/streams-node-split' ) ); - -/** -* @name stderr -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stderr} -*/ -setReadOnly( streams, 'stderr', require( '@stdlib/streams-node-stderr' ) ); - -/** -* @name stdin -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdin} -*/ -setReadOnly( streams, 'stdin', require( '@stdlib/streams-node-stdin' ) ); - -/** -* @name stdout -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/stdout} -*/ -setReadOnly( streams, 'stdout', require( '@stdlib/streams-node-stdout' ) ); - -/** -* @name transformStream -* @memberof streams -* @readonly -* @type {Function} -* @see {@link module:@stdlib/streams/node/transform} -*/ -setReadOnly( streams, 'transformStream', require( '@stdlib/streams-node-transform' ) ); - - -// EXPORTS // - -module.exports = streams; diff --git a/package.json b/package.json index cd6da20..d6debe5 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.2", "description": "Node.js streams.", "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", - "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,83 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/streams-node-debug": "^0.2.2", - "@stdlib/streams-node-debug-sink": "^0.2.2", - "@stdlib/streams-node-empty": "^0.2.2", - "@stdlib/streams-node-from-array": "^0.2.2", - "@stdlib/streams-node-from-circular-array": "^0.2.2", - "@stdlib/streams-node-from-constant": "^0.2.2", - "@stdlib/streams-node-from-iterator": "^0.2.2", - "@stdlib/streams-node-from-strided-array": "^0.2.2", - "@stdlib/streams-node-inspect": "^0.2.2", - "@stdlib/streams-node-inspect-sink": "^0.2.2", - "@stdlib/streams-node-join": "^0.2.2", - "@stdlib/streams-node-split": "^0.2.2", - "@stdlib/streams-node-stderr": "^0.2.2", - "@stdlib/streams-node-stdin": "^0.2.2", - "@stdlib/streams-node-stdout": "^0.2.2", - "@stdlib/streams-node-transform": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-to-iterator": "^0.2.2", - "@stdlib/array-uint8": "^0.2.2", - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-browser": "^0.2.2", - "@stdlib/assert-is-buffer": "^0.2.2", - "@stdlib/assert-is-collection": "^0.2.2", - "@stdlib/assert-is-error": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-iterator-like": "^0.2.2", - "@stdlib/assert-is-nonnegative-integer": "^0.2.2", - "@stdlib/assert-is-nonnegative-number": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/assert-is-regexp": "^0.2.2", - "@stdlib/assert-is-string": "^0.2.2", - "@stdlib/assert-is-uint8array": "^0.2.2", - "@stdlib/assert-is-windows": "^0.2.2", - "@stdlib/blas-base-gcopy": "^0.2.1", - "@stdlib/buffer-ctor": "^0.2.2", - "@stdlib/buffer-from-arraybuffer": "^0.2.2", - "@stdlib/buffer-from-string": "^0.2.2", - "@stdlib/fs-read-file": "^0.2.2", - "@stdlib/object-assign": "^0.2.2", - "@stdlib/process-exec-path": "^0.2.2", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/random-iter-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-define-nonenumerable-property": "^0.2.2", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2", - "@stdlib/utils-inherit": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "@stdlib/utils-next-tick": "^0.2.2", - "@stdlib/utils-noop": "^0.2.2", - "@stdlib/utils-parse-json": "^0.2.2", - "proxyquire": "^2.0.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.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "standard", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5d24857 --- /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 eab55c2..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 streams = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof streams, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains streams', function test( t ) { - var keys = objectKeys( streams ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -});