MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / getParseRegexForToken

Function getParseRegexForToken

tests/test_code/js/moment/moment.js:797–803  ·  view source on GitHub ↗
(token, config)

Source from the content-addressed store, hash-verified

795 }
796
797 function getParseRegexForToken(token, config) {
798 if (!hasOwnProp(regexes, token)) {
799 return new RegExp(unescapeFormat(token));
800 }
801
802 return regexes[token](config._strict, config._locale);
803 }
804
805 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
806 function unescapeFormat(s) {

Callers 1

Calls 2

hasOwnPropFunction · 0.85
unescapeFormatFunction · 0.85

Tested by

no test coverage detected