@stdlib/utils-async-every-by-right 0.0.7 → 0.1.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 +101 -36
- package/dist/index.d.ts +3 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +14 -19
- package/lib/factory.js +4 -4
- package/lib/index.js +3 -3
- package/lib/limit.js +1 -1
- package/lib/{every_by_right.js → main.js} +0 -1
- package/lib/validate.js +4 -3
- package/package.json +19 -17
- package/docs/repl.txt +0 -209
- package/docs/types/test.ts +0 -152
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
|
# everyByRightAsync
|
|
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
|
> Test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.
|
|
26
37
|
|
|
@@ -61,6 +72,12 @@ function predicate( value, next ) {
|
|
|
61
72
|
setTimeout( onTimeout, value );
|
|
62
73
|
function onTimeout() {
|
|
63
74
|
console.log( value );
|
|
75
|
+
/* =>
|
|
76
|
+
1000
|
|
77
|
+
2500
|
|
78
|
+
3000
|
|
79
|
+
*/
|
|
80
|
+
|
|
64
81
|
next( null, true );
|
|
65
82
|
}
|
|
66
83
|
}
|
|
@@ -70,17 +87,12 @@ function done( error, bool ) {
|
|
|
70
87
|
throw error;
|
|
71
88
|
}
|
|
72
89
|
console.log( bool );
|
|
90
|
+
// => true
|
|
73
91
|
}
|
|
74
92
|
|
|
75
93
|
var arr = [ 1000, 2500, 3000 ];
|
|
76
94
|
|
|
77
95
|
everyByRightAsync( arr, predicate, done );
|
|
78
|
-
/* =>
|
|
79
|
-
1000
|
|
80
|
-
2500
|
|
81
|
-
3000
|
|
82
|
-
true
|
|
83
|
-
*/
|
|
84
96
|
```
|
|
85
97
|
|
|
86
98
|
If a `predicate` function calls the `next` callback with a non-truthy test argument, the function stops processing any additional `collection` elements and returns `false` for the test result.
|
|
@@ -101,19 +113,19 @@ function done( error, bool ) {
|
|
|
101
113
|
throw error;
|
|
102
114
|
}
|
|
103
115
|
console.log( bool );
|
|
116
|
+
// => false
|
|
104
117
|
}
|
|
105
118
|
|
|
106
119
|
var arr = [ 1000, 2500, 3000 ];
|
|
107
120
|
|
|
108
121
|
everyByRightAsync( arr, predicate, done );
|
|
109
|
-
// => false
|
|
110
122
|
```
|
|
111
123
|
|
|
112
124
|
The function accepts the following `options`:
|
|
113
125
|
|
|
114
126
|
- `limit`: the maximum number of pending invocations at any one time. Default: `infinity`.
|
|
115
127
|
- `series`: `boolean` indicating whether to sequentially invoke the `predicate` function for each `collection` element. If `true`, the function sets `options.limit=1`. Default: `false`.
|
|
116
|
-
- `thisArg`: the execution context for `
|
|
128
|
+
- `thisArg`: the execution context for `predicate`.
|
|
117
129
|
|
|
118
130
|
By default, all elements are processed concurrently, which means that the function does **not** guarantee completion order. To process each `collection` element sequentially, set the `series` option to `true`.
|
|
119
131
|
|
|
@@ -122,6 +134,12 @@ function predicate( value, next ) {
|
|
|
122
134
|
setTimeout( onTimeout, value );
|
|
123
135
|
function onTimeout() {
|
|
124
136
|
console.log( value );
|
|
137
|
+
/* =>
|
|
138
|
+
3000
|
|
139
|
+
2500
|
|
140
|
+
1000
|
|
141
|
+
*/
|
|
142
|
+
|
|
125
143
|
next( null, true );
|
|
126
144
|
}
|
|
127
145
|
}
|
|
@@ -131,6 +149,7 @@ function done( error, bool ) {
|
|
|
131
149
|
throw error;
|
|
132
150
|
}
|
|
133
151
|
console.log( bool );
|
|
152
|
+
// => true
|
|
134
153
|
}
|
|
135
154
|
|
|
136
155
|
var arr = [ 1000, 2500, 3000 ];
|
|
@@ -140,12 +159,6 @@ var opts = {
|
|
|
140
159
|
};
|
|
141
160
|
|
|
142
161
|
everyByRightAsync( arr, opts, predicate, done );
|
|
143
|
-
/* =>
|
|
144
|
-
3000
|
|
145
|
-
2500
|
|
146
|
-
1000
|
|
147
|
-
true
|
|
148
|
-
*/
|
|
149
162
|
```
|
|
150
163
|
|
|
151
164
|
To limit the maximum number of pending function invocations, set the `limit` option.
|
|
@@ -155,6 +168,12 @@ function predicate( value, next ) {
|
|
|
155
168
|
setTimeout( onTimeout, value );
|
|
156
169
|
function onTimeout() {
|
|
157
170
|
console.log( value );
|
|
171
|
+
/* =>
|
|
172
|
+
2500
|
|
173
|
+
3000
|
|
174
|
+
1000
|
|
175
|
+
*/
|
|
176
|
+
|
|
158
177
|
next( null, true );
|
|
159
178
|
}
|
|
160
179
|
}
|
|
@@ -164,6 +183,7 @@ function done( error, bool ) {
|
|
|
164
183
|
throw error;
|
|
165
184
|
}
|
|
166
185
|
console.log( bool );
|
|
186
|
+
// => true
|
|
167
187
|
}
|
|
168
188
|
|
|
169
189
|
var arr = [ 1000, 2500, 3000 ];
|
|
@@ -173,12 +193,6 @@ var opts = {
|
|
|
173
193
|
};
|
|
174
194
|
|
|
175
195
|
everyByRightAsync( arr, opts, predicate, done );
|
|
176
|
-
/* =>
|
|
177
|
-
2500
|
|
178
|
-
3000
|
|
179
|
-
1000
|
|
180
|
-
true
|
|
181
|
-
*/
|
|
182
196
|
```
|
|
183
197
|
|
|
184
198
|
To set the execution context of the `predicate` function, set the `thisArg` option.
|
|
@@ -228,9 +242,21 @@ The actual number of provided arguments depends on function `length`. If the `pr
|
|
|
228
242
|
```javascript
|
|
229
243
|
function predicate( value, i, collection, next ) {
|
|
230
244
|
console.log( 'collection: %s. %d: %d', collection.join( ',' ), i, value );
|
|
245
|
+
/* =>
|
|
246
|
+
collection: 3000,2500,1000. 2: 3000
|
|
247
|
+
collection: 3000,2500,1000. 1: 2500
|
|
248
|
+
collection: 3000,2500,1000. 0: 1000
|
|
249
|
+
*/
|
|
250
|
+
|
|
231
251
|
setTimeout( onTimeout, value );
|
|
232
252
|
function onTimeout() {
|
|
233
253
|
console.log( value );
|
|
254
|
+
/* =>
|
|
255
|
+
1000
|
|
256
|
+
2500
|
|
257
|
+
3000
|
|
258
|
+
*/
|
|
259
|
+
|
|
234
260
|
next( null, true );
|
|
235
261
|
}
|
|
236
262
|
}
|
|
@@ -240,20 +266,12 @@ function done( error, bool ) {
|
|
|
240
266
|
throw error;
|
|
241
267
|
}
|
|
242
268
|
console.log( bool );
|
|
269
|
+
// => true
|
|
243
270
|
}
|
|
244
271
|
|
|
245
272
|
var arr = [ 1000, 2500, 3000 ];
|
|
246
273
|
|
|
247
274
|
everyByRightAsync( arr, predicate, done );
|
|
248
|
-
/* =>
|
|
249
|
-
collection: 3000,2500,1000. 2: 3000
|
|
250
|
-
collection: 3000,2500,1000. 1: 2500
|
|
251
|
-
collection: 3000,2500,1000. 0: 1000
|
|
252
|
-
1000
|
|
253
|
-
2500
|
|
254
|
-
3000
|
|
255
|
-
true
|
|
256
|
-
*/
|
|
257
275
|
```
|
|
258
276
|
|
|
259
277
|
#### everyByRightAsync.factory( \[options,] predicate )
|
|
@@ -281,7 +299,7 @@ var f = everyByRightAsync.factory( predicate );
|
|
|
281
299
|
var arr1 = [ 1000, 2500, 3000 ];
|
|
282
300
|
|
|
283
301
|
f( arr1, done );
|
|
284
|
-
/* =>
|
|
302
|
+
/* e.g., =>
|
|
285
303
|
1000
|
|
286
304
|
2500
|
|
287
305
|
3000
|
|
@@ -291,7 +309,7 @@ f( arr1, done );
|
|
|
291
309
|
var arr2 = [ 100, 250, 300 ];
|
|
292
310
|
|
|
293
311
|
f( arr2, done );
|
|
294
|
-
/* =>
|
|
312
|
+
/* e.g., =>
|
|
295
313
|
100
|
|
296
314
|
250
|
|
297
315
|
300
|
|
@@ -380,6 +398,25 @@ everyByRightAsync( files, predicate, done );
|
|
|
380
398
|
|
|
381
399
|
<!-- /.references -->
|
|
382
400
|
|
|
401
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
402
|
+
|
|
403
|
+
<section class="related">
|
|
404
|
+
|
|
405
|
+
* * *
|
|
406
|
+
|
|
407
|
+
## See Also
|
|
408
|
+
|
|
409
|
+
- <span class="package-name">[`@stdlib/utils-async/any-by-right`][@stdlib/utils/async/any-by-right]</span><span class="delimiter">: </span><span class="description">test whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left.</span>
|
|
410
|
+
- <span class="package-name">[`@stdlib/utils-async/every-by`][@stdlib/utils/async/every-by]</span><span class="delimiter">: </span><span class="description">test whether all elements in a collection pass a test implemented by a predicate function.</span>
|
|
411
|
+
- <span class="package-name">[`@stdlib/utils-every-by-right`][@stdlib/utils/every-by-right]</span><span class="delimiter">: </span><span class="description">test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.</span>
|
|
412
|
+
- <span class="package-name">[`@stdlib/utils-async/for-each-right`][@stdlib/utils/async/for-each-right]</span><span class="delimiter">: </span><span class="description">invoke a function once for each element in a collection, iterating from right to left.</span>
|
|
413
|
+
- <span class="package-name">[`@stdlib/utils-async/none-by-right`][@stdlib/utils/async/none-by-right]</span><span class="delimiter">: </span><span class="description">test whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left.</span>
|
|
414
|
+
- <span class="package-name">[`@stdlib/utils-async/some-by-right`][@stdlib/utils/async/some-by-right]</span><span class="delimiter">: </span><span class="description">test whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left.</span>
|
|
415
|
+
|
|
416
|
+
</section>
|
|
417
|
+
|
|
418
|
+
<!-- /.related -->
|
|
419
|
+
|
|
383
420
|
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
384
421
|
|
|
385
422
|
|
|
@@ -406,7 +443,7 @@ See [LICENSE][stdlib-license].
|
|
|
406
443
|
|
|
407
444
|
## Copyright
|
|
408
445
|
|
|
409
|
-
Copyright © 2016-
|
|
446
|
+
Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
410
447
|
|
|
411
448
|
</section>
|
|
412
449
|
|
|
@@ -419,22 +456,34 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
419
456
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/utils-async-every-by-right.svg
|
|
420
457
|
[npm-url]: https://npmjs.org/package/@stdlib/utils-async-every-by-right
|
|
421
458
|
|
|
422
|
-
[test-image]: https://github.com/stdlib-js/utils-async-every-by-right/actions/workflows/test.yml/badge.svg
|
|
423
|
-
[test-url]: https://github.com/stdlib-js/utils-async-every-by-right/actions/workflows/test.yml
|
|
459
|
+
[test-image]: https://github.com/stdlib-js/utils-async-every-by-right/actions/workflows/test.yml/badge.svg?branch=v0.1.0
|
|
460
|
+
[test-url]: https://github.com/stdlib-js/utils-async-every-by-right/actions/workflows/test.yml?query=branch:v0.1.0
|
|
424
461
|
|
|
425
462
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-async-every-by-right/main.svg
|
|
426
463
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-async-every-by-right?branch=main
|
|
427
464
|
|
|
465
|
+
<!--
|
|
466
|
+
|
|
428
467
|
[dependencies-image]: https://img.shields.io/david/stdlib-js/utils-async-every-by-right.svg
|
|
429
468
|
[dependencies-url]: https://david-dm.org/stdlib-js/utils-async-every-by-right/main
|
|
430
469
|
|
|
470
|
+
-->
|
|
471
|
+
|
|
431
472
|
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
432
|
-
[chat-url]: https://gitter.im
|
|
473
|
+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
|
|
433
474
|
|
|
434
475
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
435
476
|
|
|
436
477
|
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
437
478
|
|
|
479
|
+
[umd]: https://github.com/umdjs/umd
|
|
480
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
481
|
+
|
|
482
|
+
[deno-url]: https://github.com/stdlib-js/utils-async-every-by-right/tree/deno
|
|
483
|
+
[umd-url]: https://github.com/stdlib-js/utils-async-every-by-right/tree/umd
|
|
484
|
+
[esm-url]: https://github.com/stdlib-js/utils-async-every-by-right/tree/esm
|
|
485
|
+
[branches-url]: https://github.com/stdlib-js/utils-async-every-by-right/blob/main/branches.md
|
|
486
|
+
|
|
438
487
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/utils-async-every-by-right/main/LICENSE
|
|
439
488
|
|
|
440
489
|
[mdn-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
@@ -443,6 +492,22 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
443
492
|
|
|
444
493
|
[mdn-object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
445
494
|
|
|
495
|
+
<!-- <related-links> -->
|
|
496
|
+
|
|
497
|
+
[@stdlib/utils/async/any-by-right]: https://www.npmjs.com/package/@stdlib/utils-async-any-by-right
|
|
498
|
+
|
|
499
|
+
[@stdlib/utils/async/every-by]: https://www.npmjs.com/package/@stdlib/utils-async-every-by
|
|
500
|
+
|
|
501
|
+
[@stdlib/utils/every-by-right]: https://www.npmjs.com/package/@stdlib/utils-every-by-right
|
|
502
|
+
|
|
503
|
+
[@stdlib/utils/async/for-each-right]: https://www.npmjs.com/package/@stdlib/utils-async-for-each-right
|
|
504
|
+
|
|
505
|
+
[@stdlib/utils/async/none-by-right]: https://www.npmjs.com/package/@stdlib/utils-async-none-by-right
|
|
506
|
+
|
|
507
|
+
[@stdlib/utils/async/some-by-right]: https://www.npmjs.com/package/@stdlib/utils-async-some-by-right
|
|
508
|
+
|
|
509
|
+
<!-- </related-links> -->
|
|
510
|
+
|
|
446
511
|
</section>
|
|
447
512
|
|
|
448
513
|
<!-- /.links -->
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";var g=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var A=g(function(Q,d){
|
|
2
|
+
var B=require('@stdlib/assert-is-plain-object/dist'),h=require('@stdlib/assert-has-own-property/dist'),N=require('@stdlib/assert-is-boolean/dist').isPrimitive,R=require('@stdlib/assert-is-positive-integer/dist').isPrimitive,y=require('@stdlib/error-tools-fmtprodmsg/dist');function j(e,r){return B(r)?(h(r,"thisArg")&&(e.thisArg=r.thisArg),h(r,"series")&&(e.series=r.series,!N(e.series))?new TypeError(y('1R32o',"series",e.series)):h(r,"limit")&&(e.limit=r.limit,!R(e.limit))?new TypeError(y('1R33P',"limit",e.limit)):null):new TypeError(y('1R32V',r));}d.exports=j
|
|
3
|
+
});var E=g(function(U,x){
|
|
4
|
+
var k=require("debug"),a=k("every-by-right-async:limit");function I(e,r,i,u){var s,f,l,t,n,m;if(t=e.length,a("Collection length: %d",t),t===0)return a("Finished processing a collection."),u(null,!0);for(t<r.limit?l=t:l=r.limit,a("Concurrency limit: %d",l),a("Number of arguments: %d",i.length),s=0,n=t,m=0;m<l;m++)n>0&&v();function v(){n-=1,a("Collection element %d: %s.",n,JSON.stringify(e[n])),i.length===2?i.call(r.thisArg,e[n],c):i.length===3?i.call(r.thisArg,e[n],n,c):i.call(r.thisArg,e[n],n,e,c)}function c(o,w){if(!f){if(o)return f=!0,a("Encountered an error: %s",o.message),u(o);if(s+=1,a("Processed %d of %d collection elements.",s,t),a("Test result: %s",!!w),!w&&!f)return f=!0,a("Finished processing a collection."),u(null,!1);if(n>0)return v();if(s===t)return a("Finished processing a collection."),u(null,!0)}}}x.exports=I
|
|
5
|
+
});var b=g(function(W,T){
|
|
6
|
+
var O=require('@stdlib/assert-is-function/dist'),L=require('@stdlib/assert-is-collection/dist'),J=require('@stdlib/constants-float64-pinf/dist'),q=require('@stdlib/error-tools-fmtprodmsg/dist'),S=A(),z=E();function D(e,r){var i,u,s;if(i={},arguments.length>1){if(u=S(i,e),u)throw u;s=r}else s=e;if(!O(s))throw new TypeError(q('1R33q',s));return i.series?i.limit=1:i.limit||(i.limit=J),f;function f(l,t){if(!L(l))throw new TypeError(q('1R3Ah',l));if(!O(t))throw new TypeError(q('1R33q',t));return z(l,i,s,n);function n(m,v){if(m)return t(m,!1);t(null,v)}}}T.exports=D
|
|
7
|
+
});var C=g(function(X,P){
|
|
8
|
+
var F=b();function G(e,r,i,u){if(arguments.length<4)return F(r)(e,i);F(r,i)(e,u)}P.exports=G
|
|
9
|
+
});var H=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),V=C(),K=b();H(V,"factory",K);module.exports=V;
|
|
10
|
+
/** @license Apache-2.0 */
|
|
11
|
+
//# sourceMappingURL=index.js.map
|