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

Function configFromObject

tests/test_code/js/moment/moment.js:2909–2924  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

2907 }
2908
2909 function configFromObject(config) {
2910 if (config._d) {
2911 return;
2912 }
2913
2914 var i = normalizeObjectUnits(config._i),
2915 dayOrDate = i.day === undefined ? i.date : i.day;
2916 config._a = map(
2917 [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
2918 function (obj) {
2919 return obj && parseInt(obj, 10);
2920 }
2921 );
2922
2923 configFromArray(config);
2924 }
2925
2926 function createFromConfig(config) {
2927 var res = new Moment(checkOverflow(prepareConfig(config)));

Callers 1

configFromInputFunction · 0.85

Calls 3

normalizeObjectUnitsFunction · 0.85
mapFunction · 0.85
configFromArrayFunction · 0.85

Tested by

no test coverage detected