@duplojs/utils 1.5.0 → 1.5.1

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var unwrap = require('../common/unwrap.cjs');
4
- var override = require('../object/override.cjs');
4
+ var reduce = require('../array/reduce.cjs');
5
5
 
6
6
  function asyncReduce(...args) {
7
7
  if (args.length === 2) {
@@ -17,11 +17,7 @@ function asyncReduce(...args) {
17
17
  element,
18
18
  index,
19
19
  lastValue,
20
- nextWithObject: ((object1, object2) => ({
21
- "-next": override.override(object1, object2),
22
- })),
23
- exit: (output) => ({ "-exit": output }),
24
- next: (output) => ({ "-next": output }),
20
+ ...reduce.reduceTools,
25
21
  });
26
22
  if ("-exit" in result) {
27
23
  return result["-exit"];
@@ -1,5 +1,5 @@
1
1
  import { unwrap } from '../common/unwrap.mjs';
2
- import { override } from '../object/override.mjs';
2
+ import { reduceTools } from '../array/reduce.mjs';
3
3
 
4
4
  function asyncReduce(...args) {
5
5
  if (args.length === 2) {
@@ -15,11 +15,7 @@ function asyncReduce(...args) {
15
15
  element,
16
16
  index,
17
17
  lastValue,
18
- nextWithObject: ((object1, object2) => ({
19
- "-next": override(object1, object2),
20
- })),
21
- exit: (output) => ({ "-exit": output }),
22
- next: (output) => ({ "-next": output }),
18
+ ...reduceTools,
23
19
  });
24
20
  if ("-exit" in result) {
25
21
  return result["-exit"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duplojs/utils",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "author": {
5
5
  "name": "mathcovax",
6
6
  "url": "https://github.com/mathcovax"