@aeinbu/groupby
Advanced tools
Comparing version 1.1.0-beta-2 to 1.1.0-beta-3
"use strict"; | ||
exports.__esModule = true; | ||
var deepCompare_1 = require("./deepCompare"); | ||
var isDeepEqual_1 = require("./isDeepEqual"); | ||
var toGroups = function (predicate, createGroup, aggregate) { return function (agg, curr) { | ||
@@ -22,3 +22,3 @@ agg = agg || []; | ||
} | ||
var predicate = function (curr) { return function (group) { return group.key === keySelector(curr); }; }; | ||
var predicate = function (curr) { return function (group) { return isDeepEqual_1.isDeepEqual(group.key, keySelector(curr)); }; }; | ||
var createGroup = function (curr) { return ({ | ||
@@ -32,3 +32,3 @@ key: keySelector(curr), | ||
var noop = function () { }; | ||
exports.distinct = function () { return exports.distinctBy(function (left, right) { return deepCompare_1.isDeepEqual(left, right); }); }; | ||
exports.distinct = function () { return exports.distinctBy(function (left, right) { return isDeepEqual_1.isDeepEqual(left, right); }); }; | ||
exports.distinctBy = function (compare) { | ||
@@ -35,0 +35,0 @@ var selector = function (x) { return x; }; |
{ | ||
"name": "@aeinbu/groupby", | ||
"version": "1.1.0-beta-2", | ||
"version": "1.1.0-beta-3", | ||
"description": "Lighweight and non-intrusive functions for doing \"group by\" type transformations on collections using reducers", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -49,5 +49,5 @@ # @aeinbu/groupby | ||
// [ | ||
// [key: "Rome", values: ["Tony", "Mary", "Peter"], | ||
// ["Lkey: ondon", values: ["Peter", "Elisabeth"], | ||
// ["key: Paris", values: ["Francois"] | ||
// [{"key": "Rome", values: ["Tony", "Mary", "Peter"]}, | ||
// [{"key: "London", values: ["Peter", "Elisabeth"]}, | ||
// [{"key: "Paris", values: ["Francois"]} | ||
// ] | ||
@@ -54,0 +54,0 @@ |
Sorry, the diff of this file is not supported yet
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
15329