pinia-orm-edge 1.9.2-28644224.417ef5c → 1.9.2-28660070.3210918
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.
- package/dist/helpers.cjs +1 -0
- package/dist/helpers.d.cts +6 -1
- package/dist/helpers.d.mts +6 -1
- package/dist/helpers.d.ts +6 -1
- package/dist/helpers.mjs +1 -1
- package/package.json +2 -2
package/dist/helpers.cjs
CHANGED
package/dist/helpers.d.cts
CHANGED
@@ -6,6 +6,11 @@ import '@/composables';
|
|
6
6
|
type SortFlags = 'SORT_REGULAR' | 'SORT_FLAG_CASE';
|
7
7
|
|
8
8
|
type sorting<T> = ((record: T) => any) | string | [string, 'asc' | 'desc'][];
|
9
|
+
/**
|
10
|
+
* Creates an array of elements, sorted in specified order by the results
|
11
|
+
* of running each element in a collection thru each iteratee.
|
12
|
+
*/
|
13
|
+
declare function useSortBy<T extends Record<string, any>>(collection: T[], sort: sorting<T>, flags?: SortFlags): T[];
|
9
14
|
|
10
15
|
interface UseCollect<M extends Model = Model> {
|
11
16
|
sum: (field: string) => number;
|
@@ -51,4 +56,4 @@ declare function useMax(models: Collection, field: string): number;
|
|
51
56
|
*/
|
52
57
|
declare function usePluck(models: Collection, field: string): any[];
|
53
58
|
|
54
|
-
export { type UseCollect, useCollect, useGroupBy, useKeys, useMax, useMin, usePluck, useSum };
|
59
|
+
export { type UseCollect, type sorting, useCollect, useGroupBy, useKeys, useMax, useMin, usePluck, useSortBy, useSum };
|
package/dist/helpers.d.mts
CHANGED
@@ -6,6 +6,11 @@ import '@/composables';
|
|
6
6
|
type SortFlags = 'SORT_REGULAR' | 'SORT_FLAG_CASE';
|
7
7
|
|
8
8
|
type sorting<T> = ((record: T) => any) | string | [string, 'asc' | 'desc'][];
|
9
|
+
/**
|
10
|
+
* Creates an array of elements, sorted in specified order by the results
|
11
|
+
* of running each element in a collection thru each iteratee.
|
12
|
+
*/
|
13
|
+
declare function useSortBy<T extends Record<string, any>>(collection: T[], sort: sorting<T>, flags?: SortFlags): T[];
|
9
14
|
|
10
15
|
interface UseCollect<M extends Model = Model> {
|
11
16
|
sum: (field: string) => number;
|
@@ -51,4 +56,4 @@ declare function useMax(models: Collection, field: string): number;
|
|
51
56
|
*/
|
52
57
|
declare function usePluck(models: Collection, field: string): any[];
|
53
58
|
|
54
|
-
export { type UseCollect, useCollect, useGroupBy, useKeys, useMax, useMin, usePluck, useSum };
|
59
|
+
export { type UseCollect, type sorting, useCollect, useGroupBy, useKeys, useMax, useMin, usePluck, useSortBy, useSum };
|
package/dist/helpers.d.ts
CHANGED
@@ -6,6 +6,11 @@ import '@/composables';
|
|
6
6
|
type SortFlags = 'SORT_REGULAR' | 'SORT_FLAG_CASE';
|
7
7
|
|
8
8
|
type sorting<T> = ((record: T) => any) | string | [string, 'asc' | 'desc'][];
|
9
|
+
/**
|
10
|
+
* Creates an array of elements, sorted in specified order by the results
|
11
|
+
* of running each element in a collection thru each iteratee.
|
12
|
+
*/
|
13
|
+
declare function useSortBy<T extends Record<string, any>>(collection: T[], sort: sorting<T>, flags?: SortFlags): T[];
|
9
14
|
|
10
15
|
interface UseCollect<M extends Model = Model> {
|
11
16
|
sum: (field: string) => number;
|
@@ -51,4 +56,4 @@ declare function useMax(models: Collection, field: string): number;
|
|
51
56
|
*/
|
52
57
|
declare function usePluck(models: Collection, field: string): any[];
|
53
58
|
|
54
|
-
export { type UseCollect, useCollect, useGroupBy, useKeys, useMax, useMin, usePluck, useSum };
|
59
|
+
export { type UseCollect, type sorting, useCollect, useGroupBy, useKeys, useMax, useMin, usePluck, useSortBy, useSum };
|
package/dist/helpers.mjs
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pinia-orm-edge",
|
3
|
-
"version": "1.9.2-
|
3
|
+
"version": "1.9.2-28660070.3210918",
|
4
4
|
"description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.",
|
5
5
|
"keywords": [
|
6
6
|
"vue",
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"pinia": "^2.1.7"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
-
"@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.9.2-
|
49
|
+
"@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.9.2-28660070.3210918"
|
50
50
|
},
|
51
51
|
"devDependencies": {
|
52
52
|
"@nuxt/eslint-config": "^0.3.13",
|