@homebound/activesupport
Advanced tools
Comparing version 1.1.0-alpha.1 to 1.1.0
@@ -8,3 +8,3 @@ type KeysOfType<T, TProp> = { | ||
unique(): Array<T>; | ||
uniqueObjectsByKey(key: string): Array<T>; | ||
uniqueByKey(key: keyof T): Array<T>; | ||
compact(): Array<NonNullable<T>>; | ||
@@ -11,0 +11,0 @@ isEmpty: boolean; |
@@ -26,4 +26,3 @@ var __defProp = Object.defineProperty; | ||
}; | ||
Array.prototype.uniqueObjectsByKey = function(key) { | ||
debugger; | ||
Array.prototype.uniqueByKey = function(key) { | ||
const result = []; | ||
@@ -30,0 +29,0 @@ const group = this.groupBy((item) => item[key]); |
{ | ||
"name": "@homebound/activesupport", | ||
"version": "1.1.0-alpha.1", | ||
"version": "1.1.0", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.mjs", |
@@ -6,3 +6,3 @@ import type { KeysOfType } from "./utils"; | ||
unique(): Array<T>; | ||
uniqueObjectsByKey(key: string): Array<T>; | ||
uniqueByKey(key: keyof T): Array<T>; | ||
compact(): Array<NonNullable<T>>; | ||
@@ -150,4 +150,3 @@ isEmpty: boolean; | ||
/** Would be cool to allow an array of keys to make the criteria of "unique" more flexible */ | ||
Array.prototype.uniqueObjectsByKey = function <T>(key: string) { | ||
debugger; | ||
Array.prototype.uniqueByKey = function <T>(key: keyof T): T[] { | ||
const result: T[] = []; | ||
@@ -154,0 +153,0 @@ const group = this.groupBy((item) => item[key]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
89928
1029