npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

reviewers-edition-spell

2.0.0 • Public • Published

This npm package exports a single function that takes a single Reviewers Edition argument and returns a string containing the pronunciation of that edition in English.

The following examples are also the test suite for the function. The tests use Node.js' built-in assert module.

var assert = require('assert')
var spell = require('reviewers-edition-spell')
 
assert.equal(
  spell('1e'),
  'first edition'
)
 
assert.equal(
  spell('1e2u'),
  'first edition, second update'
)
 
assert.equal(
  spell('1e2u3c'),
  'first edition, second update, third correction'
)
 
assert.equal(
  spell('1e2u3c4d'),
  'fourth draft of first edition, second update, third correction'
)
 
assert.equal(
  spell('1e101d'),
  'one hundred first draft of first edition'
)
 
assert.equal(
  spell('101e2c'),
  'one hundred first edition, second correction'
)

The function returns false for an invalid argument.

assert.equal(
  spell('1.0.0'),
  false
)

This package is bundled with other functions for creating and manipulating Reviewers Editions in reved.

install

npm i reviewers-edition-spell

Downloadsweekly downloads

388

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability