PHP Classes

File: test/test.js

Recommend this page to a friend!
  Packages of Nikos M.   Alt PHP Paginator   test/test.js   Download  
File: test/test.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Alt PHP Paginator
Generate pagination controls for Web pages
Author: By
Last change: v.1.1.0
Date: 3 months ago
Size: 610 bytes
 

Contents

Class file image Download
"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'));