@dhmk/utils
Advanced tools
Comparing version 3.1.1 to 3.2.0
@@ -19,2 +19,3 @@ declare const defaultEntitiesKey = "byId"; | ||
update(context: NormalizedData<T, E, I>, where: string | ((item: T, index: number, id: string) => boolean), what: (item: T, index: number, id: string) => T): NormalizedData<T, E, I>; | ||
toArray(context: NormalizedData<T, E, I>): ReadonlyArray<T>; | ||
}; | ||
@@ -21,0 +22,0 @@ declare type ById = { |
@@ -93,2 +93,5 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
} | ||
function toArray(context) { | ||
return fromIds(context[idsKey], context[entitiesKey]); | ||
} | ||
return { | ||
@@ -102,3 +105,4 @@ getId: getId, | ||
update: update, | ||
toArray: toArray, | ||
}; | ||
} |
@@ -19,2 +19,3 @@ declare const defaultEntitiesKey = "byId"; | ||
update(context: NormalizedData<T, E, I>, where: string | ((item: T, index: number, id: string) => boolean), what: (item: T, index: number, id: string) => T): NormalizedData<T, E, I>; | ||
toArray(context: NormalizedData<T, E, I>): ReadonlyArray<T>; | ||
}; | ||
@@ -21,0 +22,0 @@ declare type ById = { |
@@ -98,2 +98,5 @@ "use strict"; | ||
} | ||
function toArray(context) { | ||
return (0, exports.fromIds)(context[idsKey], context[entitiesKey]); | ||
} | ||
return { | ||
@@ -107,4 +110,5 @@ getId: getId, | ||
update: update, | ||
toArray: toArray, | ||
}; | ||
} | ||
exports.dataAdapter = dataAdapter; |
{ | ||
"name": "@dhmk/utils", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"description": "A collection of frequently used functions and primitives", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
109184
2513