PATH:
opt
/
bitninja-threat-hunting
/
node_modules
/
moment
/
src
/
lib
/
locale
import isFunction from '../utils/is-function'; import extend from '../utils/extend'; import isObject from '../utils/is-object'; import hasOwnProp from '../utils/has-own-prop'; export function set(config) { var prop, i; for (i in config) { if (hasOwnProp(config, i)) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } } this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. // TODO: Remove "ordinalParse" fallback in next major release. this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source ); } export function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if ( hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop]) ) { // make sure changes to properties don't modify parent config res[prop] = extend({}, res[prop]); } } return res; }
[-] en.js
[edit]
[-] invalid.js
[edit]
[+]
..
[-] base-config.js
[edit]
[-] constructor.js
[edit]
[-] relative.js
[edit]
[-] lists.js
[edit]
[-] locales.js
[edit]
[-] pre-post-format.js
[edit]
[-] formats.js
[edit]
[-] prototype.js
[edit]
[-] calendar.js
[edit]
[-] set.js
[edit]
[-] ordinal.js
[edit]
[-] locale.js
[edit]