MCPcopy Index your code
hub / github.com/microsoft/SandDance / parseSpecifier

Function parseSpecifier

docs/tests/v2/es6/js/sanddance.js:82354–82375  ·  view source on GitHub ↗
(d, specifier, string, j)

Source from the content-addressed store, hash-verified

82352 }
82353
82354 function parseSpecifier(d, specifier, string, j) {
82355 var i = 0,
82356 n = specifier.length,
82357 m = string.length,
82358 c,
82359 parse;
82360
82361 while (i < n) {
82362 if (j >= m) return -1;
82363 c = specifier.charCodeAt(i++);
82364
82365 if (c === 37) {
82366 c = specifier.charAt(i++);
82367 parse = parses[c in pads ? specifier.charAt(i++) : c];
82368 if (!parse || (j = parse(d, string, j)) < 0) return -1;
82369 } else if (c != string.charCodeAt(j++)) {
82370 return -1;
82371 }
82372 }
82373
82374 return j;
82375 }
82376
82377 function parsePeriod(d, string, i) {
82378 var n = periodRe.exec(string.slice(i));

Callers 4

newParseFunction · 0.70
parseLocaleDateTimeFunction · 0.70
parseLocaleDateFunction · 0.70
parseLocaleTimeFunction · 0.70

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected