Dynamic formats for Numeral.js.
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.