1.1.8 • Published 2 years ago

humanify-numbers v1.1.8

Weekly downloads
25
License
MIT
Repository
github
Last release
2 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

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.20

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago