Comparing version 2.6.1 to 2.6.2
@@ -165,2 +165,3 @@ 'use strict'; | ||
fn.I = (0, _helpers.arrayToIndex)([name]); | ||
fn.singular = true; | ||
return this[action](fn); | ||
@@ -211,3 +212,5 @@ } | ||
value: function value(fn, initFactory, final) { | ||
if (this[names].length == 1) return this.reduce(fn, initFactory(), final);else return this.reduceEach(fn, initFactory, final); | ||
if (this.actions.find(function (a) { | ||
return a.singular; | ||
})) return this.reduce(fn, initFactory(), final);else return this.reduceEach(fn, initFactory, final); | ||
} | ||
@@ -214,0 +217,0 @@ }, { |
{ | ||
"name": "dodos", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "Pandas-inspired iterator-based data wrangling library for js", | ||
@@ -5,0 +5,0 @@ "main": "lib/dodo.js", |
@@ -123,2 +123,3 @@ import invariant from 'invariant' | ||
fn.I = arrayToIndex([name]) | ||
fn.singular = true | ||
return this[action](fn) | ||
@@ -156,3 +157,3 @@ } | ||
[dispatchReduce](fn, initFactory, final) { | ||
if (this[names].length == 1) | ||
if (this.actions.find(a => a.singular)) | ||
return this.reduce(fn, initFactory(), final) | ||
@@ -159,0 +160,0 @@ else |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105572
3121