1.1.8 • Published 4 years ago

humanify-numbers v1.1.8

Weekly downloads
25
License
MIT
Repository
github
Last release
4 years ago

humanify-numbers License: MIT npm version Run example

Stringify numbers for humans, aka Humanify the numbers.

E.g. 1234 ➜ "1.2K"

Install

npm install -s humanify-numbers

TypeScript Usage

Simple TypeScript code:

import { Numbers } from 'humanify-numbers'

console.log("1234567890 ➜", Numbers.stringify(1234567890))
// output: 1.2B

console.log("1234567890 ➜", Numbers.stringify(1234567890, 
                            { style: 'space' })) 
// output: 1.1GiB

console.log("1234567890 ➜", (1234567890).toLocaleString())
// compare with toLocalString(): 1,234,567,890

JavaScript Usage

Same code in simple JavaScript:

const { Numbers } = require("humanify-numbers");

console.log("1234 ➜", Numbers.stringify(1234)); 
// output: 1234 ➜ 1.2K

Read more.

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.0.20

5 years ago

0.0.18

5 years ago

0.0.19

5 years ago

0.0.16

5 years ago

0.0.17

5 years ago

0.0.14

5 years ago

0.0.15

5 years ago

0.0.13

5 years ago

0.0.10

5 years ago

0.0.11

5 years ago

0.0.12

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago