@stdlib/utils-reduce 0.1.0 → 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/NOTICE +1 -1
- package/README.md +13 -7
- package/SECURITY.md +5 -0
- package/docs/types/index.d.ts +3 -3
- package/package.json +27 -26
- package/CITATION.cff +0 -30
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -239,8 +239,9 @@ console.log( 'sum: %d', out );
|
|
|
239
239
|
## See Also
|
|
240
240
|
|
|
241
241
|
- <span class="package-name">[`@stdlib/utils-for-each`][@stdlib/utils/for-each]</span><span class="delimiter">: </span><span class="description">invoke a function for each element in a collection.</span>
|
|
242
|
+
- <span class="package-name">[`@stdlib/utils-map`][@stdlib/utils/map]</span><span class="delimiter">: </span><span class="description">apply a function to each element in an array and assign the result to an element in an output array.</span>
|
|
242
243
|
- <span class="package-name">[`@stdlib/utils-async/reduce`][@stdlib/utils/async/reduce]</span><span class="delimiter">: </span><span class="description">apply a function against an accumulator and each element in a collection and return the accumulated result.</span>
|
|
243
|
-
- <span class="package-name">[`@stdlib/utils-reduce-right`][@stdlib/utils/reduce-right]</span><span class="delimiter">: </span><span class="description">apply a function against an accumulator and each element in
|
|
244
|
+
- <span class="package-name">[`@stdlib/utils-reduce-right`][@stdlib/utils/reduce-right]</span><span class="delimiter">: </span><span class="description">apply a function against an accumulator and each element in an array while iterating from right to left and return the accumulated result.</span>
|
|
244
245
|
|
|
245
246
|
</section>
|
|
246
247
|
|
|
@@ -272,7 +273,7 @@ See [LICENSE][stdlib-license].
|
|
|
272
273
|
|
|
273
274
|
## Copyright
|
|
274
275
|
|
|
275
|
-
Copyright © 2016-
|
|
276
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
276
277
|
|
|
277
278
|
</section>
|
|
278
279
|
|
|
@@ -285,8 +286,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
285
286
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/utils-reduce.svg
|
|
286
287
|
[npm-url]: https://npmjs.org/package/@stdlib/utils-reduce
|
|
287
288
|
|
|
288
|
-
[test-image]: https://github.com/stdlib-js/utils-reduce/actions/workflows/test.yml/badge.svg?branch=v0.
|
|
289
|
-
[test-url]: https://github.com/stdlib-js/utils-reduce/actions/workflows/test.yml?query=branch:v0.
|
|
289
|
+
[test-image]: https://github.com/stdlib-js/utils-reduce/actions/workflows/test.yml/badge.svg?branch=v0.2.0
|
|
290
|
+
[test-url]: https://github.com/stdlib-js/utils-reduce/actions/workflows/test.yml?query=branch:v0.2.0
|
|
290
291
|
|
|
291
292
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-reduce/main.svg
|
|
292
293
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-reduce?branch=main
|
|
@@ -309,24 +310,29 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
309
310
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
310
311
|
|
|
311
312
|
[deno-url]: https://github.com/stdlib-js/utils-reduce/tree/deno
|
|
313
|
+
[deno-readme]: https://github.com/stdlib-js/utils-reduce/blob/deno/README.md
|
|
312
314
|
[umd-url]: https://github.com/stdlib-js/utils-reduce/tree/umd
|
|
315
|
+
[umd-readme]: https://github.com/stdlib-js/utils-reduce/blob/umd/README.md
|
|
313
316
|
[esm-url]: https://github.com/stdlib-js/utils-reduce/tree/esm
|
|
317
|
+
[esm-readme]: https://github.com/stdlib-js/utils-reduce/blob/esm/README.md
|
|
314
318
|
[branches-url]: https://github.com/stdlib-js/utils-reduce/blob/main/branches.md
|
|
315
319
|
|
|
316
320
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/utils-reduce/main/LICENSE
|
|
317
321
|
|
|
318
322
|
[mdn-array-reduce]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce
|
|
319
323
|
|
|
320
|
-
[@stdlib/ndarray/ctor]: https://www.npmjs.com/package/@stdlib/
|
|
324
|
+
[@stdlib/ndarray/ctor]: https://www.npmjs.com/package/@stdlib/ndarray-ctor
|
|
321
325
|
|
|
322
|
-
[@stdlib/array/complex64]: https://www.npmjs.com/package/@stdlib/
|
|
326
|
+
[@stdlib/array/complex64]: https://www.npmjs.com/package/@stdlib/array-complex64
|
|
323
327
|
|
|
324
|
-
[@stdlib/array/complex128]: https://www.npmjs.com/package/@stdlib/
|
|
328
|
+
[@stdlib/array/complex128]: https://www.npmjs.com/package/@stdlib/array-complex128
|
|
325
329
|
|
|
326
330
|
<!-- <related-links> -->
|
|
327
331
|
|
|
328
332
|
[@stdlib/utils/for-each]: https://www.npmjs.com/package/@stdlib/utils-for-each
|
|
329
333
|
|
|
334
|
+
[@stdlib/utils/map]: https://www.npmjs.com/package/@stdlib/utils-map
|
|
335
|
+
|
|
330
336
|
[@stdlib/utils/async/reduce]: https://www.npmjs.com/package/@stdlib/utils-async-reduce
|
|
331
337
|
|
|
332
338
|
[@stdlib/utils/reduce-right]: https://www.npmjs.com/package/@stdlib/utils-reduce-right
|
package/SECURITY.md
ADDED
package/docs/types/index.d.ts
CHANGED
|
@@ -122,9 +122,9 @@ type ArrayReducer<T, U, V> = Nullary<U, V> | Unary<U, V> | Binary<T, U, V> | Ter
|
|
|
122
122
|
* @returns accumulated result
|
|
123
123
|
*
|
|
124
124
|
* @example
|
|
125
|
-
* var naryFunction = require(
|
|
126
|
-
* var add = require(
|
|
127
|
-
* var array = require(
|
|
125
|
+
* var naryFunction = require( '@stdlib/utils-nary-function' );
|
|
126
|
+
* var add = require( '@stdlib/math-base-ops-add' );
|
|
127
|
+
* var array = require( '@stdlib/ndarray-array' );
|
|
128
128
|
*
|
|
129
129
|
* var opts = {
|
|
130
130
|
* 'dtype': 'generic'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/utils-reduce",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Apply a function against an accumulator and each element in an array and return the accumulated result.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -37,37 +37,38 @@
|
|
|
37
37
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@stdlib/array-base-arraylike2object": "^0.
|
|
41
|
-
"@stdlib/assert-is-array-like-object": "^0.
|
|
42
|
-
"@stdlib/assert-is-function": "^0.
|
|
43
|
-
"@stdlib/assert-is-ndarray-like": "^0.
|
|
44
|
-
"@stdlib/ndarray-base-ndarraylike2object": "^0.
|
|
45
|
-
"@stdlib/ndarray-base-vind2bind": "^0.
|
|
46
|
-
"@stdlib/string-format": "^0.
|
|
47
|
-
"@stdlib/types": "^0.1
|
|
48
|
-
"@stdlib/error-tools-fmtprodmsg": "^0.
|
|
40
|
+
"@stdlib/array-base-arraylike2object": "^0.2.0",
|
|
41
|
+
"@stdlib/assert-is-array-like-object": "^0.2.0",
|
|
42
|
+
"@stdlib/assert-is-function": "^0.2.0",
|
|
43
|
+
"@stdlib/assert-is-ndarray-like": "^0.2.0",
|
|
44
|
+
"@stdlib/ndarray-base-ndarraylike2object": "^0.2.0",
|
|
45
|
+
"@stdlib/ndarray-base-vind2bind": "^0.2.0",
|
|
46
|
+
"@stdlib/string-format": "^0.2.0",
|
|
47
|
+
"@stdlib/types": "^0.3.1",
|
|
48
|
+
"@stdlib/error-tools-fmtprodmsg": "^0.2.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@stdlib/array-base-filled": "^0.
|
|
51
|
+
"@stdlib/array-base-filled": "^0.2.0",
|
|
52
52
|
"@stdlib/array-complex64": "^0.1.0",
|
|
53
|
-
"@stdlib/array-filled-by": "^0.0
|
|
54
|
-
"@stdlib/array-float64": "^0.
|
|
55
|
-
"@stdlib/
|
|
56
|
-
"@stdlib/complex-
|
|
57
|
-
"@stdlib/complex-
|
|
58
|
-
"@stdlib/
|
|
59
|
-
"@stdlib/math-base-
|
|
60
|
-
"@stdlib/math-base-ops-
|
|
61
|
-
"@stdlib/math-base-
|
|
62
|
-
"@stdlib/
|
|
63
|
-
"@stdlib/ndarray-array": "^0.0.9",
|
|
53
|
+
"@stdlib/array-filled-by": "^0.1.0",
|
|
54
|
+
"@stdlib/array-float64": "^0.2.0",
|
|
55
|
+
"@stdlib/complex-float32": "^0.2.0",
|
|
56
|
+
"@stdlib/complex-imagf": "^0.2.0",
|
|
57
|
+
"@stdlib/complex-realf": "^0.2.0",
|
|
58
|
+
"@stdlib/math-base-assert-is-nan": "^0.2.0",
|
|
59
|
+
"@stdlib/math-base-ops-add": "^0.2.0",
|
|
60
|
+
"@stdlib/math-base-ops-cadd": "^0.2.0",
|
|
61
|
+
"@stdlib/math-base-special-pow": "^0.2.0",
|
|
62
|
+
"@stdlib/ndarray-array": "^0.1.0",
|
|
64
63
|
"@stdlib/ndarray-ctor": "^0.1.0",
|
|
65
|
-
"@stdlib/random-base-discrete-uniform": "^0.0
|
|
66
|
-
"@stdlib/utils-nary-function": "^0.
|
|
67
|
-
"@stdlib/utils-noop": "^0.
|
|
64
|
+
"@stdlib/random-base-discrete-uniform": "^0.1.0",
|
|
65
|
+
"@stdlib/utils-nary-function": "^0.2.0",
|
|
66
|
+
"@stdlib/utils-noop": "^0.2.0",
|
|
68
67
|
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
69
68
|
"istanbul": "^0.4.1",
|
|
70
|
-
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
69
|
+
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
|
|
70
|
+
"@stdlib/bench-harness": "^0.2.0",
|
|
71
|
+
"@stdlib/bench": "^0.3.1"
|
|
71
72
|
},
|
|
72
73
|
"engines": {
|
|
73
74
|
"node": ">=0.10.0",
|
package/CITATION.cff
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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
|