0.1.4 • Published 1 year ago

dynamic-numeral v0.1.4

Weekly downloads
4
License
MIT
Repository
-
Last release
1 year ago

dynamic-numeral

Build Status

Dynamic formats for Numeral.js.

Usage

First register new format with Numeral.js.

import 'dynamic-numeral/register-format';

Now you can use dynamic formats:

const format = "0.01|1.0";

numeral(0.656).format(format); // 0.66
numeral(1.65).format(format); // 1.7

Check tests for more examples.