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

Function configFromInput

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

Source from the content-addressed store, hash-verified

17310 }
17311
17312 function configFromInput(config) {
17313 var input = config._i;
17314 if (isUndefined(input)) {
17315 config._d = new Date(hooks.now());
17316 } else if (isDate(input)) {
17317 config._d = new Date(input.valueOf());
17318 } else if (typeof input === 'string') {
17319 configFromString(config);
17320 } else if (isArray(input)) {
17321 config._a = map(input.slice(0), function (obj) {
17322 return parseInt(obj, 10);
17323 });
17324 configFromArray(config);
17325 } else if (isObject(input)) {
17326 configFromObject(config);
17327 } else if (isNumber(input)) {
17328 // from milliseconds
17329 config._d = new Date(input);
17330 } else {
17331 hooks.createFromInputFallback(config);
17332 }
17333 }
17334
17335 function createLocalOrUTC (input, format, locale, strict, isUTC) {
17336 var c = {};

Callers 1

prepareConfigFunction · 0.85

Calls 9

configFromStringFunction · 0.85
configFromArrayFunction · 0.85
configFromObjectFunction · 0.85
isUndefinedFunction · 0.70
isDateFunction · 0.70
isArrayFunction · 0.70
mapFunction · 0.70
isObjectFunction · 0.70
isNumberFunction · 0.70

Tested by

no test coverage detected