0.0.3 • Published 10 years ago

basic-paginator v0.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
10 years ago

Basic Paginator

Build Status

Usage:

var Paginator = require("basic-paginator"),
    content = ["a","b","c","d"],
    itemsPerPage = 3;

var paginator = new Paginator(content, itemsPerPage);

// get the first page
paginator.page(1);
// returns ["a","b","c"]

// get the second page
paginator.page(2);
// returns ["d"]

// get a page that doesn't exist
paginator.page(3);
// returns []
0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago