1.0.6 • Published 6 years ago

format-unit v1.0.6

Weekly downloads
3
License
UNLICENSED
Repository
github
Last release
6 years ago

format-unit

Format length or area units to human readable Strings.

Usage

// install
import formatUnit from 'format-unit'

// meters to ha
formatUnit('area')(200000)('ha')

// ha to meters
formatUnit('area')(200000)('m')

// meters to "prettiest" unit
formatUnit('area')(200000)(['m2', 'a', 'ha', 'km2'])

// m to km
formatUnit('length')(2000)('km')

Lincese

UNLICENSED

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago