Skip to content

getPaginate

Source Code | Documentation

util to get paginate options from context

  1. it uses context.params.paginate if it exists
  2. it uses service.options.paginate if it exists
  3. it uses context.params.adapter if it exists
ts
  import { 
getPaginate
} from 'feathers-utils/utils';

Type declaration

ts
/**
 * util to get paginate options from context
 * 1. it uses `context.params.paginate` if it exists
 * 2. it uses `service.options.paginate` if it exists
 * 3. it uses `context.params.adapter` if it exists
 */
export declare const getPaginate: <H extends HookContext = HookContext>(
  context: H,
) => PaginationOptions | undefined
ArgumentTypeDescription
contextH

Released under the MIT License.