(specifier)
| 15468 | // [[fill]align][sign][symbol][0][width][,][.precision][~][type] |
| 15469 | var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; |
| 15470 | function formatSpecifier(specifier) { |
| 15471 | if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); |
| 15472 | var match; |
| 15473 | return new FormatSpecifier({ |
| 15474 | fill: match[1], |
| 15475 | align: match[2], |
| 15476 | sign: match[3], |
| 15477 | symbol: match[4], |
| 15478 | zero: match[5], |
| 15479 | width: match[6], |
| 15480 | comma: match[7], |
| 15481 | precision: match[8] && match[8].slice(1), |
| 15482 | trim: match[9], |
| 15483 | type: match[10] |
| 15484 | }); |
| 15485 | } |
| 15486 | exports.default = formatSpecifier; |
| 15487 | formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof |
| 15488 | function FormatSpecifier(specifier) { |
nothing calls this directly
no outgoing calls
no test coverage detected