MCPcopy Index your code
hub / github.com/feiyu563/PrometheusAlert / configFromString

Function configFromString

static/plugins/chart.js/Chart.bundle.js:17070–17094  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

17068
17069 // date from iso format or fallback
17070 function configFromString(config) {
17071 var matched = aspNetJsonRegex.exec(config._i);
17072
17073 if (matched !== null) {
17074 config._d = new Date(+matched[1]);
17075 return;
17076 }
17077
17078 configFromISO(config);
17079 if (config._isValid === false) {
17080 delete config._isValid;
17081 } else {
17082 return;
17083 }
17084
17085 configFromRFC2822(config);
17086 if (config._isValid === false) {
17087 delete config._isValid;
17088 } else {
17089 return;
17090 }
17091
17092 // Final attempt, use Input Fallback
17093 hooks.createFromInputFallback(config);
17094 }
17095
17096 hooks.createFromInputFallback = deprecate(
17097 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +

Callers 1

configFromInputFunction · 0.85

Calls 2

configFromISOFunction · 0.85
configFromRFC2822Function · 0.85

Tested by

no test coverage detected