Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@aequum/paginate-common

fbuccioni1kApache-2.00.27.15TypeScript support: included

aequum pagination common components

aequum, hexagonal, rest, api, http, pagination

readme

aequum pagination common components

A collection of common shared components for pagination to be used in @aequum packages.

Components

Interfaces:

Types:

  • PaginateSortBy : Type for sort fields, based on MongoDB sort(), just an object with the field name as key and the sort direction as value this can be "asc" or 1 and "desc" or -1.

Utils:

  • sortStringToPaginateSortBy: Converts a sort string "field1 -field2" to a PaginateSortBy type like { field1: "asc", field2: "desc" }.