# mithril-node-pagination

> Pagination component for Mithril NodeJS

Latest version **2.0.2** (published 2016-09-26) · 0 weekly downloads

## Install

```sh
npm install mithril-node-pagination
pnpm add mithril-node-pagination
yarn add mithril-node-pagination
bun add mithril-node-pagination
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2016-09-26 |
| First published | 2016-05-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | hamed_ab, juju013 |
| Keywords | mithril, pagination, nodejs |

## Links

- npm: https://www.npmjs.com/package/mithril-node-pagination
- Repository: https://github.com/mithril-components/mithril_node_pagination
- Homepage: https://github.com/mithril-components/mithril_node_pagination#readme
- Issues: https://github.com/mithril-components/mithril_node_pagination/issues
- npm.io page: https://npm.io/package/mithril-node-pagination

## Dependencies (1)

- [mithril](https://npm.io/package/mithril.md) 0.2.4

## Recent versions

- 2.0.2 (latest) — 2016-09-26
- 2.0.0 — 2016-09-26
- 1.2.0 — 2016-08-18
- 1.1.0 — 2016-08-02
- 1.0.0 — 2016-05-05

## README

mithril-node-pagination
=======================

A simple pagination component for Mithril and NodeJS.

Usage
-----

    const pagination = require('mithril-node-pagination');

    const model = {
        "page": 2,
        "size": 10,
        "totalPages": 5,
        "total": 50,
        "more": true,
        "url": "go/to/page/${page}"
        ...
    }

    const ctrl = pagination.controller(model);
    const view = pagination.view(ctrl);


Options
-------

 * page: Page number.
 * size: size of each page.
 * totalPages: Total number of pages.
 * total: Total number of record available.
 * more: True if more pages exist.
 * pattern: URL template for pagination. Default is "${page}"


Test
----
Setup [mithril-component-tools](https://github.com/mithril-components/mitthril-components-tools) first. Then:

    npm install
    mct test pagination.js en

---
_Source: https://npm.io/package/mithril-node-pagination · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
