@domoinc/summary-number

0.1.1 • Public • Published

Summary Number

This module crates a service that can convert numbers to abbeviated summary numbers.

Usage

  • $ npm start to run webpack-dev-server
  • $ npm test to run unit tests
  • $ npm tdd to continuously run tests
  • $ npm run jshint to lint code
  • $ npm run build to build (and minify)
  • $ npm version (patch|minor|major) to create git release

Library Example

// init with language config
var service = new SummaryNumber(/* optional language config */);

// usage
var summaryNumber = service.summaryNumber(1234); // 1.23K

Language Config Example

var defaultConfig = {
  decimal: '.',
  thousands: ',',
  summary: ['', 'K', 'M', 'B', 'T', 'Q'],
  grouping: 3
};

Readme

Keywords

none

Package Sidebar

Install

npm i @domoinc/summary-number

Weekly Downloads

7

Version

0.1.1

License

MIT

Last publish

Collaborators

  • ttingey
  • morganjohn12
  • jeff.smith
  • cameronnokes
  • congrieb
  • diazd2
  • statianzo
  • mountain01
  • th3uiguy
  • jasonleehodges
  • jmnemelka