@financial-times/format-number
v1.0.0
Published
All-purpose number formatting in FT editorial style
Downloads
134
Maintainers
Keywords
Readme
@financial-times/format-number
Canonical number formatter for FT graphics and content, written in JavaScript. This is meant to be a 1:1 port of Financial-Times/ftddjr's Rlang number formatter.
Usage
Install:
$ npm install @financial-times/format-number
Pass any number:
import format from "@financial-times/format-number"; console.log(format(1234567890)); // 1.2bn