@stdlib/utils-parallel 0.0.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CITATION.cff +30 -0
- package/LICENSE +0 -304
- package/NOTICE +1 -1
- package/README.md +40 -52
- package/dist/index.d.ts +3 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/defaults.js +30 -18
- package/lib/index.js +2 -2
- package/lib/main.js +5 -5
- package/lib/node/exec.js +5 -4
- package/lib/validate.js +9 -8
- package/package.json +19 -29
- package/bin/cli +0 -105
- package/docs/repl.txt +0 -68
- package/docs/types/test.ts +0 -164
- package/docs/usage.txt +0 -15
- package/etc/cli_opts.json +0 -23
package/CITATION.cff
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: stdlib
|
|
3
|
+
message: >-
|
|
4
|
+
If you use this software, please cite it using the
|
|
5
|
+
metadata from this file.
|
|
6
|
+
|
|
7
|
+
type: software
|
|
8
|
+
|
|
9
|
+
authors:
|
|
10
|
+
- name: The Stdlib Authors
|
|
11
|
+
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
+
|
|
13
|
+
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
+
url: https://stdlib.io
|
|
15
|
+
|
|
16
|
+
abstract: |
|
|
17
|
+
Standard library for JavaScript and Node.js.
|
|
18
|
+
|
|
19
|
+
keywords:
|
|
20
|
+
- JavaScript
|
|
21
|
+
- Node.js
|
|
22
|
+
- TypeScript
|
|
23
|
+
- standard library
|
|
24
|
+
- scientific computing
|
|
25
|
+
- numerical computing
|
|
26
|
+
- statistical computing
|
|
27
|
+
|
|
28
|
+
license: Apache-2.0 AND BSL-1.0
|
|
29
|
+
|
|
30
|
+
date-released: 2016
|
package/LICENSE
CHANGED
|
@@ -175,307 +175,3 @@
|
|
|
175
175
|
of your accepting any such warranty or additional liability.
|
|
176
176
|
|
|
177
177
|
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
182
|
-
|
|
183
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
184
|
-
obtaining a copy of the software and accompanying documentation covered by this
|
|
185
|
-
license (the "Software") to use, reproduce, display, distribute, execute, and
|
|
186
|
-
transmit the Software, and to prepare derivative works of the Software, and to
|
|
187
|
-
permit third-parties to whom the Software is furnished to do so, all subject to
|
|
188
|
-
the following:
|
|
189
|
-
|
|
190
|
-
The copyright notices in the Software and this entire statement, including the
|
|
191
|
-
above license grant, this restriction and the following disclaimer, must be
|
|
192
|
-
included in all copies of the Software, in whole or in part, and all derivative
|
|
193
|
-
works of the Software, unless such copies or derivative works are solely in the
|
|
194
|
-
form of machine-executable object code generated by a source language processor.
|
|
195
|
-
|
|
196
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
197
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
198
|
-
FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
199
|
-
COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES
|
|
200
|
-
OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
201
|
-
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
DEPENDENCIES
|
|
207
|
-
|
|
208
|
-
The library links against the following external libraries, which have their own
|
|
209
|
-
licenses:
|
|
210
|
-
|
|
211
|
-
* OpenBLAS <https://raw.githubusercontent.com/xianyi/OpenBLAS/
|
|
212
|
-
def146efed8d5908ea04e22668feeab7099599a0/LICENSE>
|
|
213
|
-
|
|
214
|
-
Copyright (c) 2011-2014, The OpenBLAS Project
|
|
215
|
-
All rights reserved.
|
|
216
|
-
|
|
217
|
-
Redistribution and use in source and binary forms, with or without
|
|
218
|
-
modification, are permitted provided that the following conditions are
|
|
219
|
-
met:
|
|
220
|
-
|
|
221
|
-
1. Redistributions of source code must retain the above copyright
|
|
222
|
-
notice, this list of conditions and the following disclaimer.
|
|
223
|
-
|
|
224
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
225
|
-
notice, this list of conditions and the following disclaimer in
|
|
226
|
-
the documentation and/or other materials provided with the
|
|
227
|
-
distribution.
|
|
228
|
-
|
|
229
|
-
3. Neither the name of the OpenBLAS project nor the names of
|
|
230
|
-
its contributors may be used to endorse or promote products
|
|
231
|
-
derived from this software without specific prior written
|
|
232
|
-
permission.
|
|
233
|
-
|
|
234
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
235
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
236
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
237
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
238
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
239
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
240
|
-
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
241
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
242
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
243
|
-
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
* Electron <https://raw.githubusercontent.com/electron/electron/
|
|
247
|
-
c4cfb3e7110266b9d7ad80e1ae097c4db564501c/LICENSE>
|
|
248
|
-
|
|
249
|
-
Copyright (c) 2013-2017 GitHub Inc.
|
|
250
|
-
|
|
251
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
252
|
-
a copy of this software and associated documentation files (the
|
|
253
|
-
"Software"), to deal in the Software without restriction, including
|
|
254
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
255
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
256
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
257
|
-
the following conditions:
|
|
258
|
-
|
|
259
|
-
The above copyright notice and this permission notice shall be
|
|
260
|
-
included in all copies or substantial portions of the Software.
|
|
261
|
-
|
|
262
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
263
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
264
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
265
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
266
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
267
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
268
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
* Boost <http://www.boost.org/LICENSE_1_0.txt>
|
|
272
|
-
|
|
273
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
274
|
-
|
|
275
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
276
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
277
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
278
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
279
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
280
|
-
do so, all subject to the following:
|
|
281
|
-
|
|
282
|
-
The copyright notices in the Software and this entire statement, including
|
|
283
|
-
the above license grant, this restriction and the following disclaimer,
|
|
284
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
285
|
-
all derivative works of the Software, unless such copies or derivative
|
|
286
|
-
works are solely in the form of machine-executable object code generated by
|
|
287
|
-
a source language processor.
|
|
288
|
-
|
|
289
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
290
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
291
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
292
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
293
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
294
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
295
|
-
DEALINGS IN THE SOFTWARE.
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
* Cephes <http://www.netlib.org/cephes/readme>
|
|
299
|
-
|
|
300
|
-
Copyright (c) 1984-2000 Stephen L. Moshier
|
|
301
|
-
|
|
302
|
-
Some software in this archive may be from the book _Methods and Programs for
|
|
303
|
-
Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989)
|
|
304
|
-
or from the Cephes Mathematical Library, a commercial product. In either event,
|
|
305
|
-
it is copyrighted by the author. What you see here may be used freely but it
|
|
306
|
-
comes with no support or guarantee.
|
|
307
|
-
|
|
308
|
-
Stephen L. Moshier
|
|
309
|
-
moshier@na-net.ornl.gov
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
ATTRIBUTION
|
|
314
|
-
|
|
315
|
-
The library contains implementations from the following external libraries,
|
|
316
|
-
which have their own licenses:
|
|
317
|
-
|
|
318
|
-
* FreeBSD <https://svnweb.freebsd.org/>
|
|
319
|
-
|
|
320
|
-
Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
|
|
321
|
-
|
|
322
|
-
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
323
|
-
Permission to use, copy, modify, and distribute this
|
|
324
|
-
software is freely granted, provided that this notice
|
|
325
|
-
is preserved.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
* FDLIBM <http://www.netlib.org/fdlibm/>
|
|
329
|
-
|
|
330
|
-
Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
|
|
331
|
-
|
|
332
|
-
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
333
|
-
Permission to use, copy, modify, and distribute this
|
|
334
|
-
software is freely granted, provided that this notice
|
|
335
|
-
is preserved.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
|
|
339
|
-
|
|
340
|
-
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
341
|
-
|
|
342
|
-
Redistribution and use in source and binary forms, with or without
|
|
343
|
-
modification, are permitted provided that the following conditions are
|
|
344
|
-
met:
|
|
345
|
-
|
|
346
|
-
* Redistributions of source code must retain the above copyright
|
|
347
|
-
notice, this list of conditions and the following disclaimer.
|
|
348
|
-
* Redistributions in binary form must reproduce the above
|
|
349
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
350
|
-
in the documentation and/or other materials provided with the
|
|
351
|
-
distribution.
|
|
352
|
-
* Neither the name of Google Inc. nor the names of its
|
|
353
|
-
contributors may be used to endorse or promote products derived from
|
|
354
|
-
this software without specific prior written permission.
|
|
355
|
-
|
|
356
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
357
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
358
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
359
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
360
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
361
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
362
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
363
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
364
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
365
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
366
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
* SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/>
|
|
370
|
-
|
|
371
|
-
Public domain.
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
* ESLint <https://raw.githubusercontent.com/eslint/eslint/master/LICENSE>
|
|
375
|
-
|
|
376
|
-
Copyright JS Foundation and other contributors, https://js.foundation
|
|
377
|
-
|
|
378
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
379
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
380
|
-
in the Software without restriction, including without limitation the rights
|
|
381
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
382
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
383
|
-
furnished to do so, subject to the following conditions:
|
|
384
|
-
|
|
385
|
-
The above copyright notice and this permission notice shall be included in
|
|
386
|
-
all copies or substantial portions of the Software.
|
|
387
|
-
|
|
388
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
389
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
390
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
391
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
392
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
393
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
394
|
-
THE SOFTWARE.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
* StatsFuns.jl <https://raw.githubusercontent.com/JuliaStats/StatsFuns.jl/
|
|
398
|
-
e66dd973650c375bc1739c820e5b96bb5bd000a8/LICENSE.md>
|
|
399
|
-
|
|
400
|
-
Copyright (c) 2015: Dahua Lin.
|
|
401
|
-
|
|
402
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
403
|
-
a copy of this software and associated documentation files (the
|
|
404
|
-
"Software"), to deal in the Software without restriction, including
|
|
405
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
406
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
407
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
408
|
-
the following conditions:
|
|
409
|
-
|
|
410
|
-
The above copyright notice and this permission notice shall be
|
|
411
|
-
included in all copies or substantial portions of the Software.
|
|
412
|
-
|
|
413
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
414
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
415
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
416
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
417
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
418
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
419
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
|
|
423
|
-
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>
|
|
424
|
-
|
|
425
|
-
The MIT License (MIT)
|
|
426
|
-
|
|
427
|
-
Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:
|
|
428
|
-
|
|
429
|
-
https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors
|
|
430
|
-
|
|
431
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
432
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
433
|
-
in the Software without restriction, including without limitation the rights
|
|
434
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
435
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
436
|
-
furnished to do so, subject to the following conditions:
|
|
437
|
-
|
|
438
|
-
The above copyright notice and this permission notice shall be included in all
|
|
439
|
-
copies or substantial portions of the Software.
|
|
440
|
-
|
|
441
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
442
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
443
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
444
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
445
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
446
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
447
|
-
SOFTWARE.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
* MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/
|
|
451
|
-
mt19937ar.c>
|
|
452
|
-
|
|
453
|
-
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
|
454
|
-
All rights reserved.
|
|
455
|
-
|
|
456
|
-
Redistribution and use in source and binary forms, with or without
|
|
457
|
-
modification, are permitted provided that the following conditions
|
|
458
|
-
are met:
|
|
459
|
-
|
|
460
|
-
1. Redistributions of source code must retain the above copyright
|
|
461
|
-
notice, this list of conditions and the following disclaimer.
|
|
462
|
-
|
|
463
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
464
|
-
notice, this list of conditions and the following disclaimer in the
|
|
465
|
-
documentation and/or other materials provided with the distribution.
|
|
466
|
-
|
|
467
|
-
3. The names of its contributors may not be used to endorse or promote
|
|
468
|
-
products derived from this software without specific prior written
|
|
469
|
-
permission.
|
|
470
|
-
|
|
471
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
472
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
473
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
474
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
475
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
476
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
477
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
478
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
479
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
480
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
481
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2023 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -18,9 +18,20 @@ limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
<details>
|
|
23
|
+
<summary>
|
|
24
|
+
About stdlib...
|
|
25
|
+
</summary>
|
|
26
|
+
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
|
|
27
|
+
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
|
|
28
|
+
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
|
|
29
|
+
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
|
|
30
|
+
</details>
|
|
31
|
+
|
|
21
32
|
# Parallel
|
|
22
33
|
|
|
23
|
-
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
|
|
34
|
+
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
24
35
|
|
|
25
36
|
> Execute scripts in parallel.
|
|
26
37
|
|
|
@@ -311,63 +322,22 @@ parallel( files, opts, done );
|
|
|
311
322
|
|
|
312
323
|
<!-- /.examples -->
|
|
313
324
|
|
|
314
|
-
* * *
|
|
315
325
|
|
|
316
|
-
<section class="cli">
|
|
317
326
|
|
|
318
|
-
|
|
327
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
319
328
|
|
|
320
|
-
<section class="
|
|
329
|
+
<section class="related">
|
|
321
330
|
|
|
322
|
-
##
|
|
331
|
+
## See Also
|
|
323
332
|
|
|
324
|
-
|
|
333
|
+
- <span class="package-name">[`@stdlib/utils-parallel-cli`][@stdlib/utils-parallel-cli]</span><span class="delimiter">: </span><span class="description">CLI package for use as a command-line utility.</span>
|
|
325
334
|
|
|
326
|
-
```bash
|
|
327
|
-
npm install -g @stdlib/utils-parallel
|
|
328
|
-
```
|
|
329
335
|
|
|
330
336
|
</section>
|
|
331
337
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
### Usage
|
|
335
|
-
|
|
336
|
-
```text
|
|
337
|
-
Usage: parallel [options] <script1> <script2> ...
|
|
338
|
-
|
|
339
|
-
Options:
|
|
340
|
-
|
|
341
|
-
-h, --help Print this message.
|
|
342
|
-
-V, --version Print the package version.
|
|
343
|
-
--cmd cmd Executable file/command.
|
|
344
|
-
--workers num Number of workers.
|
|
345
|
-
--concurrency num Number of scripts to run concurrently.
|
|
346
|
-
--ordered Preserve order of script output.
|
|
347
|
-
--uid uid Process user identity.
|
|
348
|
-
--gid gid Process group identity.
|
|
349
|
-
--maxbuffer size Max buffer size for stdout and stderr.
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
</section>
|
|
353
|
-
|
|
354
|
-
<!-- /.usage -->
|
|
355
|
-
|
|
356
|
-
<section class="examples">
|
|
357
|
-
|
|
358
|
-
### Examples
|
|
338
|
+
<!-- /.related -->
|
|
359
339
|
|
|
360
|
-
|
|
361
|
-
$ parallel --cmd 'node' --workers 4 --concurrency 8 ./1.js ./2.js ./3.js ./4.js ./5.js ./6.js ./7.js ./8.js ./9.js ./10.js
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
</section>
|
|
365
|
-
|
|
366
|
-
<!-- /.examples -->
|
|
367
|
-
|
|
368
|
-
</section>
|
|
369
|
-
|
|
370
|
-
<!-- /.cli -->
|
|
340
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
371
341
|
|
|
372
342
|
|
|
373
343
|
<section class="main-repo" >
|
|
@@ -393,7 +363,7 @@ See [LICENSE][stdlib-license].
|
|
|
393
363
|
|
|
394
364
|
## Copyright
|
|
395
365
|
|
|
396
|
-
Copyright © 2016-
|
|
366
|
+
Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
397
367
|
|
|
398
368
|
</section>
|
|
399
369
|
|
|
@@ -403,25 +373,43 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
403
373
|
|
|
404
374
|
<section class="links">
|
|
405
375
|
|
|
376
|
+
[@stdlib/utils-parallel-cli]: https://www.npmjs.com/package/@stdlib/utils-parallel-cli
|
|
377
|
+
|
|
406
378
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/utils-parallel.svg
|
|
407
379
|
[npm-url]: https://npmjs.org/package/@stdlib/utils-parallel
|
|
408
380
|
|
|
409
|
-
[test-image]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml/badge.svg
|
|
410
|
-
[test-url]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml
|
|
381
|
+
[test-image]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml/badge.svg?branch=v0.2.0
|
|
382
|
+
[test-url]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml?query=branch:v0.2.0
|
|
411
383
|
|
|
412
384
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-parallel/main.svg
|
|
413
385
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-parallel?branch=main
|
|
414
386
|
|
|
387
|
+
<!--
|
|
388
|
+
|
|
415
389
|
[dependencies-image]: https://img.shields.io/david/stdlib-js/utils-parallel.svg
|
|
416
390
|
[dependencies-url]: https://david-dm.org/stdlib-js/utils-parallel/main
|
|
417
391
|
|
|
392
|
+
-->
|
|
393
|
+
|
|
418
394
|
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
419
|
-
[chat-url]: https://gitter.im
|
|
395
|
+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
|
|
420
396
|
|
|
421
397
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
422
398
|
|
|
423
399
|
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
424
400
|
|
|
401
|
+
[cli-section]: https://github.com/stdlib-js/utils-parallel#cli
|
|
402
|
+
[cli-url]: https://github.com/stdlib-js/utils-parallel/tree/cli
|
|
403
|
+
[@stdlib/utils-parallel]: https://github.com/stdlib-js/utils-parallel/tree/main
|
|
404
|
+
|
|
405
|
+
[umd]: https://github.com/umdjs/umd
|
|
406
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
407
|
+
|
|
408
|
+
[deno-url]: https://github.com/stdlib-js/utils-parallel/tree/deno
|
|
409
|
+
[umd-url]: https://github.com/stdlib-js/utils-parallel/tree/umd
|
|
410
|
+
[esm-url]: https://github.com/stdlib-js/utils-parallel/tree/esm
|
|
411
|
+
[branches-url]: https://github.com/stdlib-js/utils-parallel/blob/main/branches.md
|
|
412
|
+
|
|
425
413
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/utils-parallel/main/LICENSE
|
|
426
414
|
|
|
427
415
|
[node-js]: http://nodejs.org/
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";var p=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var B=p(function(Rr,T){
|
|
2
|
+
var R=require('@stdlib/os-num-cpus/dist');function $(){return{workers:R-1,concurrency:R-1,cmd:"node",ordered:!1,uid:null,gid:null,encoding:"buffer",maxBuffer:200*1024*1024}}T.exports=$
|
|
3
|
+
});var K=p(function(Tr,I){
|
|
4
|
+
var rr=require('@stdlib/assert-is-plain-object/dist'),w=require('@stdlib/assert-has-own-property/dist'),_=require('@stdlib/assert-is-positive-integer/dist').isPrimitive,E=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,er=require('@stdlib/assert-is-boolean/dist').isPrimitive,ir=require('@stdlib/assert-is-string/dist').isPrimitive,v=require('@stdlib/error-tools-fmtprodmsg/dist');function nr(e,r){return rr(r)?w(r,"concurrency")&&(e.concurrency=r.concurrency,!_(e.concurrency))?new TypeError(v('1WZ3P',"concurrency",e.concurrency)):w(r,"workers")&&(e.workers=r.workers,!_(e.workers))?new TypeError(v('1WZ3P',"workers",e.workers)):w(r,"cmd")&&(e.cmd=r.cmd,!ir(e.cmd))?new TypeError(v('1WZ2W',"cmd",e.cmd)):w(r,"ordered")&&(e.ordered=r.ordered,!er(e.ordered))?new TypeError(v('1WZ2o',"ordered",e.ordered)):w(r,"uid")&&(e.uid=r.uid,!E(e.uid))?new TypeError(v('1WZ2t',"uid",e.uid)):w(r,"gid")&&(e.gid=r.gid,!E(e.gid))?new TypeError(v('1WZ2t',"gid",e.gid)):w(r,"maxBuffer")&&(e.maxBuffer=r.maxBuffer,!E(e.maxBuffer))?new TypeError(v('1WZ2t',"maxBuffer",e.maxBuffer)):null:new TypeError(v('1WZ2V',r));}I.exports=nr
|
|
5
|
+
});var W=p(function(Br,D){
|
|
6
|
+
var tr=require('@stdlib/utils-keys/dist'),P=require('@stdlib/process-env/dist');function ur(){var e,r,a,o;for(e=tr(P),a={},o=0;o<e.length;o++)r=e[o],a[r]=P[r];return a}function dr(e){var r=ur();return r.WORKER_CMD=e.cmd,r.WORKER_ENCODING=e.encoding,r.WORKER_MAX_BUFFER=e.maxBuffer,e.ordered&&(r.WORKER_ORDERED="1"),e.uid&&(r.WORKER_UID=e.uid),e.gid&&(r.WORKER_GID=e.gid),r}D.exports=dr
|
|
7
|
+
});var j=p(function(_r,N){
|
|
8
|
+
var ar=require('@stdlib/process-cwd/dist'),or=W();function cr(e){var r={cwd:ar(),env:or(e),stdio:"inherit"};return e.uid&&(r.uid=e.uid),e.gid&&(r.gid=e.gid),r}N.exports=cr
|
|
9
|
+
});var A=p(function(Ir,S){
|
|
10
|
+
var sr=require("child_process").fork,fr=require("path"),vr=require("debug"),O=require('@stdlib/utils-keys/dist'),F=require('@stdlib/error-tools-fmtprodmsg/dist'),lr=j(),u=vr("parallel:exec"),gr=fr.resolve(__dirname,"./worker/index.js");function mr(e,r,a){var o,c,l,f,y,d,x,k,g,h,m;for(u("Options: %s.",JSON.stringify(r)),o=0,u("Creating %d workers...",r.workers),c={},y=[],f=lr(r),m=0;m<r.workers;m++)u("Creating child process..."),d=sr(gr,y,f),d.on("error",Y(d)),d.on("close",L(d)),d.on("exit",z(d)),d.on("disconnect",Q(d)),d.on("message",J(d)),u("Child process created. pid: %d.",d.pid),c[d.pid]=d;for(x=O(c),u("%d workers created.",x.length),u("Running %d scripts concurrently...",r.concurrency),l={},g=-1,m=0;m<r.concurrency;m++)k=x[m%x.length],b(c[k]);function b(n){var t;if(g+=1,g>=e.length){if(t=O(l).length,t>0){u("%d scripts are pending.",t);return}return u("All scripts have finished."),q()}u("Instructing child process to run script: %s. pid: %d.",e[g],n.pid),n.send(e[g]),l[e[g]]=!0,u("%d of %d scripts have been processed.",g,e.length)}function J(n){return t;function t(i){u("Child process message: %s. pid: %d.",i,n.pid),delete l[i],b(n)}}function L(n){return t;function t(i,s){u("Child process closed. Code: %d. Signal: %s. pid: %d.",i,s,n.pid),C(i,s),X()}}function X(){o+=1,u("%d of %d child processes have closed.",o,r.workers),o===r.workers&&Z()}function z(n){return t;function t(i,s){u("Child process exited. Code: %d. Signal: %s. pid: %d.",i,s,n.pid),C(i,s)}}function q(n){var t,i,s;for(n&&!h&&(h=n),u("Instructing child processes to close..."),t=O(c),s=0;s<t.length;s++)i=t[s],u("Instructing child process (pid: %d) to close...",i),c[i].send("close")}function Q(n){return t;function t(){u("Child process disconnected. pid: %d.",n.pid)}}function Y(n){return t;function t(i){u("Child process error: %s. pid: %d.",i.message,n.pid),q(i)}}function C(n,t){var i;if(!h&&(n!==null&&n!==0?i=new Error(F('1WZBi',n)):t!==null&&(i=new Error(F('1WZBj',t))),i))return i.code=n,i.signal=t,q(i)}function Z(){if(h)return a(h);a()}}S.exports=mr
|
|
11
|
+
});var M=p(function(Kr,V){
|
|
12
|
+
var pr=A();V.exports=pr
|
|
13
|
+
});var H=p(function(Pr,G){
|
|
14
|
+
var wr=require("path"),hr=require('@stdlib/assert-is-string-array/dist').primitives,yr=require('@stdlib/assert-is-function/dist'),U=require('@stdlib/error-tools-fmtprodmsg/dist'),xr=require('@stdlib/process-cwd/dist'),qr=B(),Er=K(),Or=M();function kr(){var e,r,a,o,c,l,f;if(r=arguments[0],!hr(r))throw new TypeError(U('1WZ3s',r));if(r=r.slice(),a=qr(),arguments.length>2){if(e=arguments[1],o=arguments[2],c=Er(a,e),c)throw c}else o=arguments[1];if(!yr(o))throw new TypeError(U('1WZ2b',o));for(a.concurrency>r.length&&(a.concurrency=r.length),a.workers>a.concurrency&&(a.workers=a.concurrency),l=xr(),f=0;f<r.length;f++)r[f]=wr.resolve(l,r[f]);Or(r,a,y);function y(d){if(d)return o(d);o()}}G.exports=kr
|
|
15
|
+
});var br=H();module.exports=br;
|
|
16
|
+
/** @license Apache-2.0 */
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../lib/defaults.js", "../lib/validate.js", "../lib/node/env.js", "../lib/node/options.js", "../lib/node/exec.js", "../lib/node/index.js", "../lib/main.js", "../lib/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numCPUs = require( '@stdlib/os-num-cpus' );\n\n\n// MAIN //\n\n/**\n* Returns default options.\n*\n* @private\n* @returns {Object} default options\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Number of workers:\n\t\t'workers': numCPUs - 1,\n\n\t\t// Number of scripts to execute concurrently:\n\t\t'concurrency': numCPUs - 1,\n\n\t\t// Executable file/command:\n\t\t'cmd': 'node',\n\n\t\t// Boolean indicating whether script output can be interleaved or must be ordered:\n\t\t'ordered': false,\n\n\t\t// Process user identity:\n\t\t'uid': null,\n\n\t\t// Process group identity:\n\t\t'gid': null,\n\n\t\t// `stdio` encoding:\n\t\t'encoding': 'buffer',\n\n\t\t// Max child process `stdio` buffer size:\n\t\t'maxBuffer': 200 * 1024 * 1024 // bytes\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isPrimitive;\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - options to validate\n* @param {string} [options.cmd] - executable file/command\n* @param {PositiveInteger} [options.concurrency] - number of scripts to execute concurrently\n* @param {PositiveInteger} [options.workers] - number of workers\n* @param {boolean} [options.ordered] - boolean indicating whether to preserve the order of script output\n* @param {NonNegativeInteger} [options.uid] - process user identity\n* @param {NonNegativeInteger} [options.gid] - process group identity\n* @param {NonNegativeInteger} [options.maxBuffer] - max child process `stdio` buffer size\n* @returns {(Error|null)} error or null\n*\n* @example\n* var opts = {};\n* var options = {\n* 'concurrency': 4,\n* 'workers': 2\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'concurrency' ) ) {\n\t\topts.concurrency = options.concurrency;\n\t\tif ( !isPositiveInteger( opts.concurrency ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'concurrency', opts.concurrency ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'workers' ) ) {\n\t\topts.workers = options.workers;\n\t\tif ( !isPositiveInteger( opts.workers ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'workers', opts.workers ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'cmd' ) ) {\n\t\topts.cmd = options.cmd;\n\t\tif ( !isString( opts.cmd ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'cmd', opts.cmd ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'ordered' ) ) {\n\t\topts.ordered = options.ordered;\n\t\tif ( !isBoolean( opts.ordered ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'ordered', opts.ordered ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'uid' ) ) {\n\t\topts.uid = options.uid;\n\t\tif ( !isNonNegativeInteger( opts.uid ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'uid', opts.uid ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'gid' ) ) {\n\t\topts.gid = options.gid;\n\t\tif ( !isNonNegativeInteger( opts.gid ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'gid', opts.gid ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'maxBuffer' ) ) {\n\t\topts.maxBuffer = options.maxBuffer;\n\t\tif ( !isNonNegativeInteger( opts.maxBuffer ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'maxBuffer', opts.maxBuffer ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils-keys' );\nvar ENV = require( '@stdlib/process-env' );\n\n\n// FUNCTIONS //\n\n/**\n* Copies `process.env`.\n*\n* ## Notes\n*\n* - This implementation accommodates `process.env` on older Node.js versions (<=v0.10.x), where `process.env` was object-like, but would show unexpected behavior when attempting to get own property descriptors.\n*\n* @private\n* @returns {Object} copy of `process.env`\n*/\nfunction copy() {\n\tvar keys;\n\tvar env;\n\tvar out;\n\tvar i;\n\n\tkeys = objectKeys( ENV );\n\tout = {};\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tenv = keys[ i ];\n\t\tout[ env ] = ENV[ env ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns worker environment variables.\n*\n* @private\n* @param {Options} opts - options\n* @param {string} opts.cmd - executable file/command\n* @param {boolean} opts.ordered - boolean indicating whether to preserve order of script output\n* @param {(NonNegativeInteger|null)} opts.uid - process user identity\n* @param {(NonNegativeInteger|null)} opts.gid - process group identity\n* @param {string} opts.encoding - `stdio` encoding\n* @param {NonNegativeInteger} opts.maxBuffer - max child process `stdio` buffer size\n* @returns {Object} environment variables\n*/\nfunction env( opts ) {\n\tvar out = copy();\n\n\tout.WORKER_CMD = opts.cmd;\n\tout.WORKER_ENCODING = opts.encoding;\n\tout.WORKER_MAX_BUFFER = opts.maxBuffer;\n\n\tif ( opts.ordered ) {\n\t\tout.WORKER_ORDERED = '1';\n\t}\n\tif ( opts.uid ) {\n\t\tout.WORKER_UID = opts.uid;\n\t}\n\tif ( opts.gid ) {\n\t\tout.WORKER_GID = opts.gid;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = env;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar cwd = require( '@stdlib/process-cwd' );\nvar env = require( './env.js' );\n\n\n// MAIN //\n\n/**\n* Returns child process options.\n*\n* @private\n* @param {Options} options - worker options\n* @param {(NonNegativeInteger|null)} [options.uid] - process user identity\n* @param {(NonNegativeInteger|null)} [options.gid] - process group identity\n* @returns {Object} child process options\n*/\nfunction getOpts( options ) {\n\tvar opts = {\n\t\t'cwd': cwd(),\n\t\t'env': env( options ),\n\t\t'stdio': 'inherit' // Use stdio of parent process\n\t};\n\tif ( options.uid ) {\n\t\topts.uid = options.uid;\n\t}\n\tif ( options.gid ) {\n\t\topts.gid = options.gid;\n\t}\n\treturn opts;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getOpts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar fork = require( 'child_process' ).fork;\nvar path = require( 'path' );\nvar logger = require( 'debug' );\nvar objectKeys = require( '@stdlib/utils-keys' );\nvar format = require( '@stdlib/string-format' );\nvar getOpts = require( './options.js' );\n\n\n// VARIABLES //\n\nvar debug = logger( 'parallel:exec' );\nvar WORKER_FILEPATH = path.resolve( __dirname, './worker/index.js' );\n\n\n// MAIN //\n\n/**\n* Executes scripts in parallel.\n*\n* @private\n* @param {StringArray} files - script absolute file paths\n* @param {Options} opts - options\n* @param {PositiveInteger} opts.concurrency - number of scripts to execute concurrently\n* @param {PositiveInteger} opts.workers - number of workers\n* @param {string} opts.cmd - executable file/command\n* @param {boolean} opts.ordered - boolean indicating whether to preserve order of script output\n* @param {(NonNegativeInteger|null)} opts.uid - process user identity\n* @param {(NonNegativeInteger|null)} opts.gid - process group identity\n* @param {string} opts.encoding - `stdio` encoding\n* @param {NonNegativeInteger} opts.maxBuffer - max child process `stdio` buffer size\n* @param {Callback} clbk - callback to invoke after executing all scripts\n*/\nfunction exec( files, opts, clbk ) {\n\tvar numClosed;\n\tvar workers;\n\tvar pending;\n\tvar fopts;\n\tvar args;\n\tvar proc;\n\tvar pids;\n\tvar pid;\n\tvar idx;\n\tvar err;\n\tvar i;\n\n\tdebug( 'Options: %s.', JSON.stringify( opts ) );\n\tnumClosed = 0;\n\n\tdebug( 'Creating %d workers...', opts.workers );\n\tworkers = {};\n\targs = [];\n\tfopts = getOpts( opts );\n\tfor ( i = 0; i < opts.workers; i++ ) {\n\t\tdebug( 'Creating child process...' );\n\t\tproc = fork( WORKER_FILEPATH, args, fopts );\n\n\t\tproc.on( 'error', onError( proc ) );\n\t\tproc.on( 'close', onClose( proc ) );\n\t\tproc.on( 'exit', onExit( proc ) );\n\t\tproc.on( 'disconnect', onDisconnect( proc ) );\n\t\tproc.on( 'message', onMessage( proc ) );\n\n\t\tdebug( 'Child process created. pid: %d.', proc.pid );\n\t\tworkers[ proc.pid ] = proc;\n\t}\n\tpids = objectKeys( workers );\n\tdebug( '%d workers created.', pids.length );\n\n\tdebug( 'Running %d scripts concurrently...', opts.concurrency );\n\tpending = {};\n\tidx = -1;\n\tfor ( i = 0; i < opts.concurrency; i++ ) {\n\t\tpid = pids[ i%pids.length ];\n\t\tnext( workers[ pid ] ); // eslint-disable-line node/callback-return\n\t}\n\n\t/**\n\t* Instructs a child process to run the next script.\n\t*\n\t* @private\n\t* @param {Object} child - child process\n\t* @returns {void}\n\t*/\n\tfunction next( child ) {\n\t\tvar numPending;\n\t\tidx += 1;\n\t\tif ( idx >= files.length ) {\n\t\t\tnumPending = objectKeys( pending ).length;\n\t\t\tif ( numPending > 0 ) {\n\t\t\t\tdebug( '%d scripts are pending.', numPending );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdebug( 'All scripts have finished.' );\n\t\t\treturn close();\n\t\t}\n\t\tdebug( 'Instructing child process to run script: %s. pid: %d.', files[ idx ], child.pid );\n\t\tchild.send( files[ idx ] );\n\t\tpending[ files[ idx ] ] = true;\n\n\t\tdebug( '%d of %d scripts have been processed.', idx, files.length );\n\t}\n\n\t/**\n\t* Returns a callback to be invoked upon receiving a message from a child process.\n\t*\n\t* @private\n\t* @param {Object} child - child process\n\t* @returns {Callback} callback\n\t*/\n\tfunction onMessage( child ) {\n\t\treturn listener;\n\n\t\t/**\n\t\t* Callback invoked upon receiving a message from a child process.\n\t\t*\n\t\t* @private\n\t\t* @param {string} filepath - script filepath\n\t\t*/\n\t\tfunction listener( filepath ) {\n\t\t\tdebug( 'Child process message: %s. pid: %d.', filepath, child.pid );\n\n\t\t\t// Remove the script from the listing of pending scripts:\n\t\t\tdelete pending[ filepath ];\n\n\t\t\t// Indicate that the child process is ready for its next task:\n\t\t\tnext( child );\n\t\t}\n\t}\n\n\t/**\n\t* Returns a callback to be invoked upon child process close.\n\t*\n\t* @private\n\t* @param {Object} child - child process\n\t* @returns {Callback} callback\n\t*/\n\tfunction onClose( child ) {\n\t\treturn listener;\n\n\t\t/**\n\t\t* Callback invoked upon child process close.\n\t\t*\n\t\t* @private\n\t\t* @param {(number|null)} code - exit code\n\t\t* @param {(string|null)} signal - termination signal\n\t\t*/\n\t\tfunction listener( code, signal ) {\n\t\t\tdebug( 'Child process closed. Code: %d. Signal: %s. pid: %d.', code, signal, child.pid );\n\t\t\tprocessExit( code, signal );\n\t\t\tchildClosed();\n\t\t}\n\t}\n\n\t/**\n\t* Callback invoked if a child closes.\n\t*\n\t* @private\n\t*/\n\tfunction childClosed() {\n\t\tnumClosed += 1;\n\t\tdebug( '%d of %d child processes have closed.', numClosed, opts.workers );\n\t\tif ( numClosed === opts.workers ) {\n\t\t\tdone(); // eslint-disable-line node/callback-return\n\t\t}\n\t}\n\n\t/**\n\t* Returns a callback to be invoked upon child process exit.\n\t*\n\t* @private\n\t* @param {Object} child - child process\n\t* @returns {Callback} callback\n\t*/\n\tfunction onExit( child ) {\n\t\treturn listener;\n\n\t\t/**\n\t\t* Callback invoked upon child process exit.\n\t\t*\n\t\t* @private\n\t\t* @param {(number|null)} code - exit code\n\t\t* @param {(string|null)} signal - termination signal\n\t\t*/\n\t\tfunction listener( code, signal ) {\n\t\t\tdebug( 'Child process exited. Code: %d. Signal: %s. pid: %d.', code, signal, child.pid );\n\t\t\tprocessExit( code, signal );\n\t\t}\n\t}\n\n\t/**\n\t* Closes all workers.\n\t*\n\t* @private\n\t* @param {Error} [error] - error object\n\t*/\n\tfunction close( error ) {\n\t\tvar pids;\n\t\tvar pid;\n\t\tvar i;\n\t\tif ( error && !err ) {\n\t\t\terr = error;\n\t\t}\n\t\tdebug( 'Instructing child processes to close...' );\n\t\tpids = objectKeys( workers );\n\t\tfor ( i = 0; i < pids.length; i++ ) {\n\t\t\tpid = pids[ i ];\n\t\t\tdebug( 'Instructing child process (pid: %d) to close...', pid );\n\t\t\tworkers[ pid ].send( 'close' );\n\t\t}\n\t}\n\n\t/**\n\t* Returns a callback to be invoked upon child process disconnect.\n\t*\n\t* @private\n\t* @param {Object} child - child process\n\t* @returns {Callback} callback\n\t*/\n\tfunction onDisconnect( child ) {\n\t\treturn listener;\n\n\t\t/**\n\t\t* Callback invoked upon child process disconnect.\n\t\t*\n\t\t* @private\n\t\t*/\n\t\tfunction listener() {\n\t\t\tdebug( 'Child process disconnected. pid: %d.', child.pid );\n\t\t}\n\t}\n\n\t/**\n\t* Returns a callback to be invoked upon encountering a child process error.\n\t*\n\t* @private\n\t* @param {Object} child - child process\n\t* @returns {Callback} callback\n\t*/\n\tfunction onError( child ) {\n\t\treturn listener;\n\n\t\t/**\n\t\t* Callback invoked upon a child process error.\n\t\t*\n\t\t* @private\n\t\t* @param {Error} error - error object\n\t\t*/\n\t\tfunction listener( error ) {\n\t\t\tdebug( 'Child process error: %s. pid: %d.', error.message, child.pid );\n\t\t\tclose( error );\n\t\t}\n\t}\n\n\t/**\n\t* Processes process exit values. If provided a non-zero exit code or termination signal, instructs the process to close.\n\t*\n\t* @private\n\t* @param {(number|null)} code - exit code\n\t* @param {(string|null)} signal - termination signal\n\t* @returns {void}\n\t*/\n\tfunction processExit( code, signal ) {\n\t\tvar error;\n\t\tif ( err ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( code !== null && code !== 0 ) {\n\t\t\terror = new Error( format( 'unexpected error. Child process failed with exit code: `%u`.', code ) );\n\t\t} else if ( signal !== null ) {\n\t\t\terror = new Error( format( 'unexpected error. Child process failed due to termination signal: `%s`.', signal ) );\n\t\t}\n\t\tif ( error ) {\n\t\t\terror.code = code;\n\t\t\terror.signal = signal;\n\t\t\treturn close( error );\n\t\t}\n\t}\n\n\t/**\n\t* Callback invoked once all tasks are finished.\n\t*\n\t* @private\n\t* @returns {void}\n\t*/\n\tfunction done() {\n\t\tif ( err ) {\n\t\t\treturn clbk( err );\n\t\t}\n\t\tclbk();\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = exec;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar exec = require( './exec.js' );\n\n\n// EXPORTS //\n\nmodule.exports = exec;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar path = require( 'path' );\nvar isStringArray = require( '@stdlib/assert-is-string-array' ).primitives;\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar format = require( '@stdlib/string-format' );\nvar cwd = require( '@stdlib/process-cwd' );\nvar defaults = require( './defaults.js' );\nvar validate = require( './validate.js' );\nvar exec = require( './node' );\n\n\n// MAIN //\n\n/**\n* Executes scripts in parallel.\n*\n* @param {StringArray} files - script file paths\n* @param {Options} [options] - function options\n* @param {string} [options.cmd='node'] - executable file/command\n* @param {PositiveInteger} [options.concurrency] - number of scripts to execute concurrently\n* @param {PositiveInteger} [options.workers] - number of workers\n* @param {boolean} [options.ordered=false] - boolean indicating whether to preserve the order of script output\n* @param {NonNegativeInteger} [options.uid] - process user identity\n* @param {NonNegativeInteger} [options.gid] - process group identity\n* @param {NonNegativeInteger} [options.maxBuffer=200*1024*1024] - max child process `stdio` buffer size\n* @param {Callback} clbk - callback to invoke after executing all scripts\n* @throws {TypeError} first argument must be an array of strings\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {TypeError} callback argument must be a function\n*\n* @example\n* var files = [ './a.js', './b.js ' ];\n*\n* var opts = {\n* 'workers': 3,\n* 'concurrency': 3\n* };\n*\n* function done( error ) {\n* if ( error ) {\n* throw error;\n* }\n* }\n*\n* parallel( files, opts, done );\n*/\nfunction parallel() {\n\tvar options;\n\tvar files;\n\tvar opts;\n\tvar clbk;\n\tvar err;\n\tvar dir;\n\tvar i;\n\n\tfiles = arguments[ 0 ];\n\tif ( !isStringArray( files ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array of strings. Value: `%s`.', files ) );\n\t}\n\tfiles = files.slice();\n\topts = defaults();\n\tif ( arguments.length > 2 ) {\n\t\toptions = arguments[ 1 ];\n\t\tclbk = arguments[ 2 ];\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t} else {\n\t\tclbk = arguments[ 1 ];\n\t}\n\tif ( !isFunction( clbk ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) );\n\t}\n\t// Prevent the number of concurrent scripts exceeding the number of actual scripts to run.\n\tif ( opts.concurrency > files.length ) {\n\t\topts.concurrency = files.length;\n\t}\n\t// Prevent the number of workers exceeding the number of concurrent scripts (excess capacity), as some workers would never be allocated scripts to run and always be idle.\n\tif ( opts.workers > opts.concurrency ) {\n\t\topts.workers = opts.concurrency;\n\t}\n\t// Resolve any relative paths to absolute paths...\n\tdir = cwd();\n\tfor ( i = 0; i < files.length; i++ ) {\n\t\tfiles[ i ] = path.resolve( dir, files[ i ] );\n\t}\n\texec( files, opts, done );\n\n\t/**\n\t* Callback invoked after executing all scripts.\n\t*\n\t* @private\n\t* @param {Error} error - error object\n\t* @returns {void}\n\t*/\n\tfunction done( error ) {\n\t\tif ( error ) {\n\t\t\treturn clbk( error );\n\t\t}\n\t\tclbk();\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = parallel;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Execute scripts in parallel.\n*\n* @module @stdlib/utils-parallel\n*\n* @example\n* var parallel = require( '@stdlib/utils-parallel' );\n*\n* function done( error ) {\n* if ( error ) {\n* throw error;\n* }\n* }\n* var files = [ './a.js', './b.js' ];\n* parallel( files, done );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,qBAAsB,EAe7C,SAASC,GAAW,CACnB,MAAO,CAEN,QAAWD,EAAU,EAGrB,YAAeA,EAAU,EAGzB,IAAO,OAGP,QAAW,GAGX,IAAO,KAGP,IAAO,KAGP,SAAY,SAGZ,UAAa,IAAM,KAAO,IAC3B,CACD,CAKAD,EAAO,QAAUE,ICpEjB,IAAAC,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsBA,IAAIC,GAAW,QAAS,gCAAiC,EACrDC,EAAa,QAAS,iCAAkC,EACxDC,EAAoB,QAAS,oCAAqC,EAAE,YACpEC,EAAuB,QAAS,uCAAwC,EAAE,YAC1EC,GAAY,QAAS,2BAA4B,EAAE,YACnDC,GAAW,QAAS,0BAA2B,EAAE,YACjDC,EAAS,QAAS,uBAAwB,EA+B9C,SAASC,GAAUC,EAAMC,EAAU,CAClC,OAAMT,GAAUS,CAAQ,EAGnBR,EAAYQ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BC,EAAK,YAAcD,EAAM,QAGrBC,EAAK,QAAUA,EAAK,cACxBA,EAAK,QAAUA,EAAK,aAGrBG,EAAMV,GAAI,EACJW,EAAI,EAAGA,EAAIL,EAAM,OAAQK,IAC9BL,EAAOK,CAAE,EAAIf,GAAK,QAASc,EAAKJ,EAAOK,CAAE,CAAE,EAE5CR,GAAMG,EAAOC,EAAMK,CAAK,EASxB,SAASA,EAAMC,EAAQ,CACtB,GAAKA,EACJ,OAAOL,EAAMK,CAAM,EAEpBL,EAAK,CACN,CACD,CAKAb,EAAO,QAAUS,KC1FjB,IAAIU,GAAO,IAKX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_defaults", "__commonJSMin", "exports", "module", "numCPUs", "defaults", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isPositiveInteger", "isNonNegativeInteger", "isBoolean", "isString", "format", "validate", "opts", "options", "require_env", "__commonJSMin", "exports", "module", "objectKeys", "ENV", "copy", "keys", "env", "out", "i", "opts", "require_options", "__commonJSMin", "exports", "module", "cwd", "env", "getOpts", "options", "opts", "require_exec", "__commonJSMin", "exports", "module", "fork", "path", "logger", "objectKeys", "format", "getOpts", "debug", "WORKER_FILEPATH", "exec", "files", "opts", "clbk", "numClosed", "workers", "pending", "fopts", "args", "proc", "pids", "pid", "idx", "err", "i", "onError", "onClose", "onExit", "onDisconnect", "onMessage", "next", "child", "numPending", "close", "listener", "filepath", "code", "signal", "processExit", "childClosed", "done", "error", "require_node", "__commonJSMin", "exports", "module", "exec", "require_main", "__commonJSMin", "exports", "module", "path", "isStringArray", "isFunction", "format", "cwd", "defaults", "validate", "exec", "parallel", "options", "files", "opts", "clbk", "err", "dir", "i", "done", "error", "main"]
|
|
7
|
+
}
|
package/docs/types/index.d.ts
CHANGED
package/lib/browser/index.js
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
function runner() {
|
|
33
33
|
// TODO: implementation
|
|
34
|
-
throw new Error( 'not implemented. Please post an issue on the @stdlib/stdlib issue tracker if you would like this to be implemented.' );
|
|
34
|
+
throw new Error( 'not implemented. Please post an issue on the @stdlib/stdlib issue tracker if you would like this to be implemented. https://github.com/stdlib-js/stdlib/issues/new/choose' );
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
|