@aequum/paginate-common
v0.27.15
Published
aequum pagination common components
Maintainers
Readme
aequum pagination common components
A collection of common shared components for pagination to be used in @aequum packages.
Components
Interfaces:
PaginateResult<Model, Paginator = PaginateResultPaginator>: Interface which represents the result of a pagination operation, includes thedataandpaginatorproperties.PaginateResultPaginator: Interface which represents the paginator for a pagination operation, includespage,size,pages,next,prev, andtotalproperties.
Types:
PaginateSortBy: Type for sort fields, based on MongoDBsort(), just an object with the field name as key and the sort direction as value this can be"asc"or1and"desc"or-1.
Utils:
sortStringToPaginateSortBy: Converts a sort string"field1 -field2"to aPaginateSortBytype like{ field1: "asc", field2: "desc" }.
