paper-rulings

1.3.16 • Public • Published

paper-rulings

Build Status NPM Version Coverage

Measurements and information about paper rulings

Installation

npm install --save paper-rulings

Usage

const paperRulings = require('paper-rulings')

console.log(JSON.stringify(paperRulings('gregg', { format: 'decimal', units: 'mm' }), null, 2))

Output

{
  "names": [
    "Gregg"
  ],
  "spacing": "8.730823935791932 mm",
  "margins": [
    {
      "left": "50%"
    }
  ],
  "notes": "Used for stenography. Includes a single margin down the center of the page."
}

API

paperRulings(rulingName, options)

rulingName

Type: string

One of the following:

  • Narrow
  • Medium
  • College
  • Wide
  • Legal
  • Gregg
  • Pitman
  • Quad

options

Type: object

options.format

Allows you to specify the output values formats

Type: string

One of the following:

  • fraction
  • decimal
options.units

Specify the output measurement units

Type: string

One of the following:

  • mm
  • cm
  • m
  • in
  • ft
  • mi
options.spacing

Quad ruling allows custom spacing

Type: string

A number followed by any of the units allowed in options.units

Examples:

  • 1/2 in
  • 10 mm
  • 0.1 ft

Change Log

v1.3.0 - 2017-06-30

  • added quad ruling

v1.2.0 - 2017-04-30

  • added unit conversions and units field in options

v1.1.0 - 2017-04-30

  • added decimal/fraction output formats and format field in options
  • improved options validation and handling

v1.0.0 - 2017-04-30

  • initial release

License

MIT © Forrest Desjardins

Dependencies (2)

Dev Dependencies (4)

Package Sidebar

Install

npm i paper-rulings

Weekly Downloads

5

Version

1.3.16

License

MIT

Unpacked Size

7.73 kB

Total Files

4

Last publish

Collaborators

  • fgdesjardins