Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 598 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 598 Bytes

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.