MCPcopy Create free account
hub / github.com/breck7/scroll / formatNumerals

Function formatNumerals

external/.d3.js:9526–9532  ·  view source on GitHub ↗
(numerals)

Source from the content-addressed store, hash-verified

9524}
9525
9526function formatNumerals(numerals) {
9527 return function(value) {
9528 return value.replace(/[0-9]/g, function(i) {
9529 return numerals[+i];
9530 });
9531 };
9532}
9533
9534// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
9535var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;

Callers 1

formatLocale$1Function · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected