@stdlib/utils-while-each 0.0.4 → 0.0.8

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/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2021 The Stdlib Authors.
1
+ Copyright (c) 2016-2022 The Stdlib Authors.
package/README.md CHANGED
@@ -20,7 +20,7 @@ limitations under the License.
20
20
 
21
21
  # whileEach
22
22
 
23
- [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
23
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
24
24
 
25
25
  > While a test condition is true, invoke a function for each element in a collection.
26
26
 
@@ -250,6 +250,21 @@ whileEach( arr, predicate, log );
250
250
 
251
251
  <!-- /.references -->
252
252
 
253
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
254
+
255
+ <section class="related">
256
+
257
+ * * *
258
+
259
+ ## See Also
260
+
261
+ - <span class="package-name">[`@stdlib/utils/until-each`][@stdlib/utils/until-each]</span><span class="delimiter">: </span><span class="description">until a test condition is true, invoke a function for each element in a collection.</span>
262
+ - <span class="package-name">[`@stdlib/utils/while-each-right`][@stdlib/utils/while-each-right]</span><span class="delimiter">: </span><span class="description">while a test condition is true, invoke a function for each element in a collection, iterating from right to left.</span>
263
+
264
+ </section>
265
+
266
+ <!-- /.related -->
267
+
253
268
  <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
254
269
 
255
270
 
@@ -276,7 +291,7 @@ See [LICENSE][stdlib-license].
276
291
 
277
292
  ## Copyright
278
293
 
279
- Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
294
+ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
280
295
 
281
296
  </section>
282
297
 
@@ -295,9 +310,20 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
295
310
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-while-each/main.svg
296
311
  [coverage-url]: https://codecov.io/github/stdlib-js/utils-while-each?branch=main
297
312
 
313
+ <!--
314
+
298
315
  [dependencies-image]: https://img.shields.io/david/stdlib-js/utils-while-each.svg
299
316
  [dependencies-url]: https://david-dm.org/stdlib-js/utils-while-each/main
300
317
 
318
+ -->
319
+
320
+ [umd]: https://github.com/umdjs/umd
321
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
322
+
323
+ [deno-url]: https://github.com/stdlib-js/utils-while-each/tree/deno
324
+ [umd-url]: https://github.com/stdlib-js/utils-while-each/tree/umd
325
+ [esm-url]: https://github.com/stdlib-js/utils-while-each/tree/esm
326
+
301
327
  [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
302
328
  [chat-url]: https://gitter.im/stdlib-js/stdlib/
303
329
 
@@ -313,6 +339,14 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
313
339
 
314
340
  [mdn-object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
315
341
 
342
+ <!-- <related-links> -->
343
+
344
+ [@stdlib/utils/until-each]: https://www.npmjs.com/package/@stdlib/utils-until-each
345
+
346
+ [@stdlib/utils/while-each-right]: https://www.npmjs.com/package/@stdlib/utils-while-each-right
347
+
348
+ <!-- </related-links> -->
349
+
316
350
  </section>
317
351
 
318
352
  <!-- /.links -->
@@ -54,7 +54,7 @@ type BinaryPredicate = ( value: any, index: number ) => boolean;
54
54
  * @param collection - input collection
55
55
  * @returns boolean indicating whether an element in a collection passes a test
56
56
  */
57
- type TertiaryPredicate = ( value: any, index: number, collection: Collection ) => boolean; // tslint-disable-line max-line-length
57
+ type TernaryPredicate = ( value: any, index: number, collection: Collection ) => boolean; // tslint-disable-line max-line-length
58
58
 
59
59
  /**
60
60
  * Checks whether an element in a collection passes a test.
@@ -64,7 +64,7 @@ type TertiaryPredicate = ( value: any, index: number, collection: Collection ) =
64
64
  * @param collection - input collection
65
65
  * @returns boolean indicating whether an element in a collection passes a test
66
66
  */
67
- type Predicate = NullaryPredicate | UnaryPredicate | BinaryPredicate | TertiaryPredicate; // tslint-disable-line max-line-length
67
+ type Predicate = NullaryPredicate | UnaryPredicate | BinaryPredicate | TernaryPredicate; // tslint-disable-line max-line-length
68
68
 
69
69
  /**
70
70
  * Function invoked for each collection element passing a test.
@@ -93,7 +93,7 @@ type Binary = ( value: any, index: number ) => void;
93
93
  * @param index - collection index
94
94
  * @param collection - input collection
95
95
  */
96
- type Tertiary = ( value: any, index: number, collection: Collection ) => void;
96
+ type Ternary = ( value: any, index: number, collection: Collection ) => void;
97
97
 
98
98
  /**
99
99
  * Function invoked for each collection element passing a test.
@@ -102,7 +102,7 @@ type Tertiary = ( value: any, index: number, collection: Collection ) => void;
102
102
  * @param index - collection index
103
103
  * @param collection - input collection
104
104
  */
105
- type Callback = Nullary | Unary | Binary | Tertiary;
105
+ type Callback = Nullary | Unary | Binary | Ternary;
106
106
 
107
107
  /**
108
108
  * While a test condition is true, invokes a function once for each element in a collection.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/utils-while-each",
3
- "version": "0.0.4",
3
+ "version": "0.0.8",
4
4
  "description": "While a test condition is true, invoke a function for each element in a collection.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
package/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- # CHANGELOG
2
-
3
- > Package changelog.
4
-
5
- See [GitHub Releases](https://github.com/stdlib-js/utils-while-each/releases) for the changelog.