Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including page-label-generator with all npm packages installed. Try it out:

var pageLabelGenerator = require("page-label-generator")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

page-label-generator v1.0.4

Page Label Generator

Page Label Generator

Build Status

The Page Label Generator is a module that automatically generates page labels for "book-like" objects in a variety of ways. See the example usage section below to see the variety of page labeling options such as roman numberals, back-to-front, foliation, and starting numbers.

The Page Label Generator was originally written by Jon Stroop for Plum. This project cleans up some code, adds tape as a testing framework, and publishes it as a npm module for easy inclusion into browser-based apps.


If you want to run this code in the browser as part of your app, you will need webpack and you will need to add the babel polyfill at the top of your entry script like so:

import babelPolyfill from 'babel-polyfill'


$ npm install

Test and Lint

$ npm test
$ npm run lint

Compile (Transpile to es5)

npm run compile

Example usage in web app

See the Webpack Demo project and the Tonic notebook.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free