(specifier)
| 9535 | var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; |
| 9536 | |
| 9537 | function formatSpecifier(specifier) { |
| 9538 | if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); |
| 9539 | var match; |
| 9540 | return new FormatSpecifier({ |
| 9541 | fill: match[1], |
| 9542 | align: match[2], |
| 9543 | sign: match[3], |
| 9544 | symbol: match[4], |
| 9545 | zero: match[5], |
| 9546 | width: match[6], |
| 9547 | comma: match[7], |
| 9548 | precision: match[8] && match[8].slice(1), |
| 9549 | trim: match[9], |
| 9550 | type: match[10] |
| 9551 | }); |
| 9552 | } |
| 9553 | |
| 9554 | formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof |
| 9555 |
no test coverage detected