Skip to content

paginate-middleware 0.3.0

Install from the command line:
Learn more about npm packages
$ npm install @untile/paginate-middleware@0.3.0
Install via package.json:
"@untile/paginate-middleware": "0.3.0"

About this version

paginate-middleware

Installation

$ yarn add @untile/paginate-middleware

Usage

Here is an example on how to use the middleware in koajs

import Koa from 'koa';

// Import the middleware.
import paginateMiddleware from '@untile/paginate-middleware';

// Create the koa app.
const app = new Koa();

// Apply the middleware.
app.use(paginateMiddleware({ maximum: 10, size: 2 }));

app.use(context => {
  // { number: '1', size: '5' }
  console.log(context.requestOptions.page);
});

// Start the app.
app.listen(4000);

Development

Install the required dependencies:

yarn

And you may now run the tests with:

yarn test

Releases

Be sure to have configured GITHUB_TOKEN in your globals.

npm version [<new version> | major | minor | patch] -m "Release %s"
git push origin master && git push --tags

Details


Assets

  • paginate-middleware-0.3.0.tgz

Download activity

  • Total downloads 493
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all