MCPcopy
hub / github.com/tdewolff/minify / configFromInput

Function configFromInput

_benchmarks/sample_moment.js:3049–3070  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

3047 }
3048
3049 function configFromInput(config) {
3050 var input = config._i;
3051 if (isUndefined(input)) {
3052 config._d = new Date(hooks.now());
3053 } else if (isDate(input)) {
3054 config._d = new Date(input.valueOf());
3055 } else if (typeof input === 'string') {
3056 configFromString(config);
3057 } else if (isArray(input)) {
3058 config._a = map(input.slice(0), function (obj) {
3059 return parseInt(obj, 10);
3060 });
3061 configFromArray(config);
3062 } else if (isObject(input)) {
3063 configFromObject(config);
3064 } else if (isNumber(input)) {
3065 // from milliseconds
3066 config._d = new Date(input);
3067 } else {
3068 hooks.createFromInputFallback(config);
3069 }
3070 }
3071
3072 function createLocalOrUTC(input, format, locale, strict, isUTC) {
3073 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…