lakutata 2.0.72 → 2.0.73
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/helper.d.ts +6 -2
- package/package.json +1 -1
- package/src/lib/helpers/Paginator.cjs +10 -1
- package/src/lib/helpers/Paginator.mjs +10 -1
- package/vendor/Package.17.cjs +184 -195
- package/vendor/Package.17.mjs +176 -187
package/helper.d.ts
CHANGED
|
@@ -4953,13 +4953,17 @@ declare class ObjectPath {
|
|
|
4953
4953
|
static has(obj: Record<string, any>, path: string): boolean;
|
|
4954
4954
|
}
|
|
4955
4955
|
|
|
4956
|
+
interface PaginatorHandlerResult<T> {
|
|
4957
|
+
total: number;
|
|
4958
|
+
items: T[];
|
|
4959
|
+
}
|
|
4956
4960
|
/**
|
|
4957
4961
|
* Paginator
|
|
4958
4962
|
* @param options
|
|
4959
4963
|
* @param handler
|
|
4960
4964
|
* @constructor
|
|
4961
4965
|
*/
|
|
4962
|
-
declare function Paginator<T, Options extends PaginationSearchDTO
|
|
4966
|
+
declare function Paginator<T, Options extends PaginationSearchDTO>(options: Options, handler: (options: Options, limit: number, offset: number) => Promise<PaginatorHandlerResult<T>>): Promise<PaginationResultDTO<T>>;
|
|
4963
4967
|
|
|
4964
4968
|
export { ArrayToSet, As, ConvertArrayLikeToIterable, ConvertArrayLikeToStream, Delay, DevNull, GetObjectNestingDepth, GetObjectPropertyPaths, Glob, GraceExit, HexToIEEE754, HexToSigned, HexToUnsigned, IEEE754ToHex, IP, IPv4, IPv6, IsAbortError, IsEmptyObject, IsExists, IsGlobString, IsHtml, IsNativeFunction, IsPath, IsPromise, IsPromiseLike, IsSymbol, IsXML, MD5, MergeArray, MergeMap, MergeSet, MissingValueError, NoCase, NonceStr, ObjectConstructor, ObjectHash, ObjectParentConstructor, ObjectParentConstructors, ObjectPath, ObjectPrototype, ObjectToMap, Paginator, RandomString, SHA1, SHA256, SetToArray, SignedToHex, SortArray, SortKeys, SortObject, Split, Statistics, Templating, ToLower, ToUpper, URLBuilder, UUID, UniqueArray, UnsignedToHex };
|
|
4965
|
-
export type { IPBinHex, IPv4SubNet, IPv6Result, IPv6SubNet, NoCaseOptions, ObjectHashOptions, SortKeysOptions, SortObjectOptions, SortOptions, SplitOptions, TemplatingOptions, URLAttributes, UUIDTypes, Version1Options as UUIDVersion1Options, Version4Options as UUIDVersion4Options, Version6Options as UUIDVersion6Options };
|
|
4969
|
+
export type { IPBinHex, IPv4SubNet, IPv6Result, IPv6SubNet, NoCaseOptions, ObjectHashOptions, PaginatorHandlerResult, SortKeysOptions, SortObjectOptions, SortOptions, SplitOptions, TemplatingOptions, URLAttributes, UUIDTypes, Version1Options as UUIDVersion1Options, Version4Options as UUIDVersion4Options, Version6Options as UUIDVersion6Options };
|
package/package.json
CHANGED
|
@@ -5,7 +5,16 @@ Object.defineProperty(exports, Symbol.toStringTag, {
|
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
async function t(t, e) {
|
|
8
|
-
|
|
8
|
+
const i = await e(t, t.limit, t.offset);
|
|
9
|
+
return {
|
|
10
|
+
items: i.items,
|
|
11
|
+
meta: {
|
|
12
|
+
count: i.items.length,
|
|
13
|
+
total: i.total,
|
|
14
|
+
limit: t.limit,
|
|
15
|
+
offset: t.offset
|
|
16
|
+
}
|
|
17
|
+
};
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
exports.Paginator = t;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
async function t(t, i) {
|
|
2
|
-
|
|
2
|
+
const e = await i(t, t.limit, t.offset);
|
|
3
|
+
return {
|
|
4
|
+
items: e.items,
|
|
5
|
+
meta: {
|
|
6
|
+
count: e.items.length,
|
|
7
|
+
total: e.total,
|
|
8
|
+
limit: t.limit,
|
|
9
|
+
offset: t.offset
|
|
10
|
+
}
|
|
11
|
+
};
|
|
3
12
|
}
|
|
4
13
|
|
|
5
14
|
export { t as Paginator };
|