"use strict";
const Paginator = require(__dirname+'/../src/js/Paginator.js');
function echo(s)
{
console.log(String(s) + "\n");
}
echo('Paginator.VERSION = ' + Paginator.VERSION + "\n");
const p1 = new Paginator(100, 10);
const p2 = (new Paginator(1000, 10, 3))
.option('prev-text', 'Prev')
.option('next-text', 'Next')
.option('placeholder', '{page}')
.option('url-pattern', '/category/{page}')
;
const p3 = new Paginator(100, 10, 2);
echo(p1);
echo(p2);
echo(p3);
echo(p1.option('type', 'selectbox'));
echo(p2.option('type', 'selectbox'));
echo(p3.option('type', 'selectbox'));
|