Skip to content

cn0047/short-string-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

short-string-number

CircleCI Maintainability Codacy Badge Coverage Status PRs Welcome

Convert number into short string.

Installation

yarn add short-string-number

Usage

const ssn = require('short-string-number');

ssn(1024)    // 1024
ssn(41939)   // 41.9k
ssn(201305)  // 201.3k
ssn(1033183) // 1.03m

Tests

yarn test