JSPM

numbered

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 184137
  • Score
    100M100P100Q165813F
  • License MIT

Stringify any number into words, and parse number strings back to a number

Package Exports

  • numbered

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (numbered) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Numbered

NPM version Build status Test coverage Greenkeeper badge

Stringify any number into words, and parse number strings back to a number.

Installation

npm install numbered --save

API

var numbered = require('numbered');

Function

Numbered exposes a single function that accepts either a string or a number. The string will delegate to the parse method and a number will delegate to the stringify method.

Parse

Parses a string into a number as best as possible.

numbered.parse('ninety nine');
// 99

numbered.parse('point two five nine');
// 0.259

Stringify

Stringifies a number to the words.

numbered.stringify(99);
// "ninety nine"

numbered.stringify(0.259);
// "zero point two five nine"

License

MIT