aboutsummaryrefslogtreecommitdiff
path: root/node_modules/moment/src/lib/locale
diff options
context:
space:
mode:
authorScoots Dash <contact@minteck.org>2022-04-23 14:12:30 +0000
committerScoots Dash <contact@minteck.org>2022-04-23 14:12:30 +0000
commita927497b43cbe1438f3d7478932f3f7d03ea347c (patch)
tree0a3c88978b4294fb30afad58daa86c46fbedc2f6 /node_modules/moment/src/lib/locale
parentba5fa694351774f2684c1aefdc215da5c6f39ba6 (diff)
parentf0db5bbbcd623812a391862d217519afafe197c6 (diff)
downloadtwilight-a927497b43cbe1438f3d7478932f3f7d03ea347c.tar.gz
twilight-a927497b43cbe1438f3d7478932f3f7d03ea347c.tar.bz2
twilight-a927497b43cbe1438f3d7478932f3f7d03ea347c.zip
Merge branch 'deprecation' into 'trunk'HEADtrunk
Disable the Twilight Package Manager See merge request minteck/twilight!1
Diffstat (limited to 'node_modules/moment/src/lib/locale')
-rw-r--r--node_modules/moment/src/lib/locale/base-config.js41
-rw-r--r--node_modules/moment/src/lib/locale/calendar.js15
-rw-r--r--node_modules/moment/src/lib/locale/constructor.js5
-rw-r--r--node_modules/moment/src/lib/locale/en.js39
-rw-r--r--node_modules/moment/src/lib/locale/formats.js36
-rw-r--r--node_modules/moment/src/lib/locale/invalid.js5
-rw-r--r--node_modules/moment/src/lib/locale/lists.js93
-rw-r--r--node_modules/moment/src/lib/locale/locale.js45
-rw-r--r--node_modules/moment/src/lib/locale/locales.js242
-rw-r--r--node_modules/moment/src/lib/locale/ordinal.js8
-rw-r--r--node_modules/moment/src/lib/locale/pre-post-format.js3
-rw-r--r--node_modules/moment/src/lib/locale/prototype.js88
-rw-r--r--node_modules/moment/src/lib/locale/relative.js32
-rw-r--r--node_modules/moment/src/lib/locale/set.js56
14 files changed, 0 insertions, 708 deletions
diff --git a/node_modules/moment/src/lib/locale/base-config.js b/node_modules/moment/src/lib/locale/base-config.js
deleted file mode 100644
index 5f8c403..0000000
--- a/node_modules/moment/src/lib/locale/base-config.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import { defaultCalendar } from './calendar';
-import { defaultLongDateFormat } from './formats';
-import { defaultInvalidDate } from './invalid';
-import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal';
-import { defaultRelativeTime } from './relative';
-
-// months
-import { defaultLocaleMonths, defaultLocaleMonthsShort } from '../units/month';
-
-// week
-import { defaultLocaleWeek } from '../units/week';
-
-// weekdays
-import {
- defaultLocaleWeekdays,
- defaultLocaleWeekdaysMin,
- defaultLocaleWeekdaysShort,
-} from '../units/day-of-week';
-
-// meridiem
-import { defaultLocaleMeridiemParse } from '../units/hour';
-
-export var baseConfig = {
- calendar: defaultCalendar,
- longDateFormat: defaultLongDateFormat,
- invalidDate: defaultInvalidDate,
- ordinal: defaultOrdinal,
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
- relativeTime: defaultRelativeTime,
-
- months: defaultLocaleMonths,
- monthsShort: defaultLocaleMonthsShort,
-
- week: defaultLocaleWeek,
-
- weekdays: defaultLocaleWeekdays,
- weekdaysMin: defaultLocaleWeekdaysMin,
- weekdaysShort: defaultLocaleWeekdaysShort,
-
- meridiemParse: defaultLocaleMeridiemParse,
-};
diff --git a/node_modules/moment/src/lib/locale/calendar.js b/node_modules/moment/src/lib/locale/calendar.js
deleted file mode 100644
index 52c6ba5..0000000
--- a/node_modules/moment/src/lib/locale/calendar.js
+++ /dev/null
@@ -1,15 +0,0 @@
-export var defaultCalendar = {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
-};
-
-import isFunction from '../utils/is-function';
-
-export function calendar(key, mom, now) {
- var output = this._calendar[key] || this._calendar['sameElse'];
- return isFunction(output) ? output.call(mom, now) : output;
-}
diff --git a/node_modules/moment/src/lib/locale/constructor.js b/node_modules/moment/src/lib/locale/constructor.js
deleted file mode 100644
index c32b73e..0000000
--- a/node_modules/moment/src/lib/locale/constructor.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export function Locale(config) {
- if (config != null) {
- this.set(config);
- }
-}
diff --git a/node_modules/moment/src/lib/locale/en.js b/node_modules/moment/src/lib/locale/en.js
deleted file mode 100644
index 470bd27..0000000
--- a/node_modules/moment/src/lib/locale/en.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import './prototype';
-import { getSetGlobalLocale } from './locales';
-import toInt from '../utils/to-int';
-
-getSetGlobalLocale('en', {
- eras: [
- {
- since: '0001-01-01',
- until: +Infinity,
- offset: 1,
- name: 'Anno Domini',
- narrow: 'AD',
- abbr: 'AD',
- },
- {
- since: '0000-12-31',
- until: -Infinity,
- offset: 1,
- name: 'Before Christ',
- narrow: 'BC',
- abbr: 'BC',
- },
- ],
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- toInt((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
-});
diff --git a/node_modules/moment/src/lib/locale/formats.js b/node_modules/moment/src/lib/locale/formats.js
deleted file mode 100644
index ea74837..0000000
--- a/node_modules/moment/src/lib/locale/formats.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import { formattingTokens } from '../format/format';
-
-export var defaultLongDateFormat = {
- LTS: 'h:mm:ss A',
- LT: 'h:mm A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A',
-};
-
-export function longDateFormat(key) {
- var format = this._longDateFormat[key],
- formatUpper = this._longDateFormat[key.toUpperCase()];
-
- if (format || !formatUpper) {
- return format;
- }
-
- this._longDateFormat[key] = formatUpper
- .match(formattingTokens)
- .map(function (tok) {
- if (
- tok === 'MMMM' ||
- tok === 'MM' ||
- tok === 'DD' ||
- tok === 'dddd'
- ) {
- return tok.slice(1);
- }
- return tok;
- })
- .join('');
-
- return this._longDateFormat[key];
-}
diff --git a/node_modules/moment/src/lib/locale/invalid.js b/node_modules/moment/src/lib/locale/invalid.js
deleted file mode 100644
index baf1a86..0000000
--- a/node_modules/moment/src/lib/locale/invalid.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export var defaultInvalidDate = 'Invalid date';
-
-export function invalidDate() {
- return this._invalidDate;
-}
diff --git a/node_modules/moment/src/lib/locale/lists.js b/node_modules/moment/src/lib/locale/lists.js
deleted file mode 100644
index 9470d07..0000000
--- a/node_modules/moment/src/lib/locale/lists.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import isNumber from '../utils/is-number';
-import { getLocale } from './locales';
-import { createUTC } from '../create/utc';
-
-function get(format, index, field, setter) {
- var locale = getLocale(),
- utc = createUTC().set(setter, index);
- return locale[field](utc, format);
-}
-
-function listMonthsImpl(format, index, field) {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
-
- format = format || '';
-
- if (index != null) {
- return get(format, index, field, 'month');
- }
-
- var i,
- out = [];
- for (i = 0; i < 12; i++) {
- out[i] = get(format, i, field, 'month');
- }
- return out;
-}
-
-// ()
-// (5)
-// (fmt, 5)
-// (fmt)
-// (true)
-// (true, 5)
-// (true, fmt, 5)
-// (true, fmt)
-function listWeekdaysImpl(localeSorted, format, index, field) {
- if (typeof localeSorted === 'boolean') {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
-
- format = format || '';
- } else {
- format = localeSorted;
- index = format;
- localeSorted = false;
-
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
-
- format = format || '';
- }
-
- var locale = getLocale(),
- shift = localeSorted ? locale._week.dow : 0,
- i,
- out = [];
-
- if (index != null) {
- return get(format, (index + shift) % 7, field, 'day');
- }
-
- for (i = 0; i < 7; i++) {
- out[i] = get(format, (i + shift) % 7, field, 'day');
- }
- return out;
-}
-
-export function listMonths(format, index) {
- return listMonthsImpl(format, index, 'months');
-}
-
-export function listMonthsShort(format, index) {
- return listMonthsImpl(format, index, 'monthsShort');
-}
-
-export function listWeekdays(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
-}
-
-export function listWeekdaysShort(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
-}
-
-export function listWeekdaysMin(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
-}
diff --git a/node_modules/moment/src/lib/locale/locale.js b/node_modules/moment/src/lib/locale/locale.js
deleted file mode 100644
index 522e36d..0000000
--- a/node_modules/moment/src/lib/locale/locale.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Side effect imports
-import './prototype';
-
-import {
- getSetGlobalLocale,
- defineLocale,
- updateLocale,
- getLocale,
- listLocales,
-} from './locales';
-
-import {
- listMonths,
- listMonthsShort,
- listWeekdays,
- listWeekdaysShort,
- listWeekdaysMin,
-} from './lists';
-
-export {
- getSetGlobalLocale,
- defineLocale,
- updateLocale,
- getLocale,
- listLocales,
- listMonths,
- listMonthsShort,
- listWeekdays,
- listWeekdaysShort,
- listWeekdaysMin,
-};
-
-import { deprecate } from '../utils/deprecate';
-import { hooks } from '../utils/hooks';
-
-hooks.lang = deprecate(
- 'moment.lang is deprecated. Use moment.locale instead.',
- getSetGlobalLocale
-);
-hooks.langData = deprecate(
- 'moment.langData is deprecated. Use moment.localeData instead.',
- getLocale
-);
-
-import './en';
diff --git a/node_modules/moment/src/lib/locale/locales.js b/node_modules/moment/src/lib/locale/locales.js
deleted file mode 100644
index 0d08232..0000000
--- a/node_modules/moment/src/lib/locale/locales.js
+++ /dev/null
@@ -1,242 +0,0 @@
-import isArray from '../utils/is-array';
-import isUndefined from '../utils/is-undefined';
-import { deprecateSimple } from '../utils/deprecate';
-import { mergeConfigs } from './set';
-import { Locale } from './constructor';
-import keys from '../utils/keys';
-
-import { baseConfig } from './base-config';
-
-// internal storage for locale config files
-var locales = {},
- localeFamilies = {},
- globalLocale;
-
-function commonPrefix(arr1, arr2) {
- var i,
- minl = Math.min(arr1.length, arr2.length);
- for (i = 0; i < minl; i += 1) {
- if (arr1[i] !== arr2[i]) {
- return i;
- }
- }
- return minl;
-}
-
-function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
-}
-
-// pick the locale from the array
-// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
-// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
-function chooseLocale(names) {
- var i = 0,
- j,
- next,
- locale,
- split;
-
- while (i < names.length) {
- split = normalizeLocale(names[i]).split('-');
- j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (
- next &&
- next.length >= j &&
- commonPrefix(split, next) >= j - 1
- ) {
- //the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return globalLocale;
-}
-
-function loadLocale(name) {
- var oldLocale = null,
- aliasedRequire;
- // TODO: Find a better way to register and load all the locales in Node
- if (
- locales[name] === undefined &&
- typeof module !== 'undefined' &&
- module &&
- module.exports
- ) {
- try {
- oldLocale = globalLocale._abbr;
- aliasedRequire = require;
- aliasedRequire('./locale/' + name);
- getSetGlobalLocale(oldLocale);
- } catch (e) {
- // mark as not found to avoid repeating expensive file require call causing high CPU
- // when trying to find en-US, en_US, en-us for every format call
- locales[name] = null; // null means not found
- }
- }
- return locales[name];
-}
-
-// This function will load locale and then set the global locale. If
-// no arguments are passed in, it will simply return the current global
-// locale key.
-export function getSetGlobalLocale(key, values) {
- var data;
- if (key) {
- if (isUndefined(values)) {
- data = getLocale(key);
- } else {
- data = defineLocale(key, values);
- }
-
- if (data) {
- // moment.duration._locale = moment._locale = data;
- globalLocale = data;
- } else {
- if (typeof console !== 'undefined' && console.warn) {
- //warn user if arguments are passed but the locale could not be set
- console.warn(
- 'Locale ' + key + ' not found. Did you forget to load it?'
- );
- }
- }
- }
-
- return globalLocale._abbr;
-}
-
-export function defineLocale(name, config) {
- if (config !== null) {
- var locale,
- parentConfig = baseConfig;
- config.abbr = name;
- if (locales[name] != null) {
- deprecateSimple(
- 'defineLocaleOverride',
- 'use moment.updateLocale(localeName, config) to change ' +
- 'an existing locale. moment.defineLocale(localeName, ' +
- 'config) should only be used for creating a new locale ' +
- 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
- );
- parentConfig = locales[name]._config;
- } else if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- parentConfig = locales[config.parentLocale]._config;
- } else {
- locale = loadLocale(config.parentLocale);
- if (locale != null) {
- parentConfig = locale._config;
- } else {
- if (!localeFamilies[config.parentLocale]) {
- localeFamilies[config.parentLocale] = [];
- }
- localeFamilies[config.parentLocale].push({
- name: name,
- config: config,
- });
- return null;
- }
- }
- }
- locales[name] = new Locale(mergeConfigs(parentConfig, config));
-
- if (localeFamilies[name]) {
- localeFamilies[name].forEach(function (x) {
- defineLocale(x.name, x.config);
- });
- }
-
- // backwards compat for now: also set the locale
- // make sure we set the locale AFTER all child locales have been
- // created, so we won't end up with the child locale set.
- getSetGlobalLocale(name);
-
- return locales[name];
- } else {
- // useful for testing
- delete locales[name];
- return null;
- }
-}
-
-export function updateLocale(name, config) {
- if (config != null) {
- var locale,
- tmpLocale,
- parentConfig = baseConfig;
-
- if (locales[name] != null && locales[name].parentLocale != null) {
- // Update existing child locale in-place to avoid memory-leaks
- locales[name].set(mergeConfigs(locales[name]._config, config));
- } else {
- // MERGE
- tmpLocale = loadLocale(name);
- if (tmpLocale != null) {
- parentConfig = tmpLocale._config;
- }
- config = mergeConfigs(parentConfig, config);
- if (tmpLocale == null) {
- // updateLocale is called for creating a new locale
- // Set abbr so it will have a name (getters return
- // undefined otherwise).
- config.abbr = name;
- }
- locale = new Locale(config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
- }
-
- // backwards compat for now: also set the locale
- getSetGlobalLocale(name);
- } else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- if (name === getSetGlobalLocale()) {
- getSetGlobalLocale(name);
- }
- } else if (locales[name] != null) {
- delete locales[name];
- }
- }
- }
- return locales[name];
-}
-
-// returns locale data
-export function getLocale(key) {
- var locale;
-
- if (key && key._locale && key._locale._abbr) {
- key = key._locale._abbr;
- }
-
- if (!key) {
- return globalLocale;
- }
-
- if (!isArray(key)) {
- //short-circuit everything else
- locale = loadLocale(key);
- if (locale) {
- return locale;
- }
- key = [key];
- }
-
- return chooseLocale(key);
-}
-
-export function listLocales() {
- return keys(locales);
-}
diff --git a/node_modules/moment/src/lib/locale/ordinal.js b/node_modules/moment/src/lib/locale/ordinal.js
deleted file mode 100644
index db44f33..0000000
--- a/node_modules/moment/src/lib/locale/ordinal.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var defaultOrdinal = '%d',
- defaultDayOfMonthOrdinalParse = /\d{1,2}/;
-
-export { defaultOrdinal, defaultDayOfMonthOrdinalParse };
-
-export function ordinal(number) {
- return this._ordinal.replace('%d', number);
-}
diff --git a/node_modules/moment/src/lib/locale/pre-post-format.js b/node_modules/moment/src/lib/locale/pre-post-format.js
deleted file mode 100644
index 3551dba..0000000
--- a/node_modules/moment/src/lib/locale/pre-post-format.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export function preParsePostFormat(string) {
- return string;
-}
diff --git a/node_modules/moment/src/lib/locale/prototype.js b/node_modules/moment/src/lib/locale/prototype.js
deleted file mode 100644
index 2057f69..0000000
--- a/node_modules/moment/src/lib/locale/prototype.js
+++ /dev/null
@@ -1,88 +0,0 @@
-import { Locale } from './constructor';
-
-var proto = Locale.prototype;
-
-import { calendar } from './calendar';
-import { longDateFormat } from './formats';
-import { invalidDate } from './invalid';
-import { ordinal } from './ordinal';
-import { preParsePostFormat } from './pre-post-format';
-import { relativeTime, pastFuture } from './relative';
-import { set } from './set';
-
-proto.calendar = calendar;
-proto.longDateFormat = longDateFormat;
-proto.invalidDate = invalidDate;
-proto.ordinal = ordinal;
-proto.preparse = preParsePostFormat;
-proto.postformat = preParsePostFormat;
-proto.relativeTime = relativeTime;
-proto.pastFuture = pastFuture;
-proto.set = set;
-
-// Eras
-import {
- localeEras,
- localeErasParse,
- localeErasConvertYear,
- erasAbbrRegex,
- erasNameRegex,
- erasNarrowRegex,
-} from '../units/era';
-proto.eras = localeEras;
-proto.erasParse = localeErasParse;
-proto.erasConvertYear = localeErasConvertYear;
-proto.erasAbbrRegex = erasAbbrRegex;
-proto.erasNameRegex = erasNameRegex;
-proto.erasNarrowRegex = erasNarrowRegex;
-
-// Month
-import {
- localeMonthsParse,
- localeMonths,
- localeMonthsShort,
- monthsRegex,
- monthsShortRegex,
-} from '../units/month';
-
-proto.months = localeMonths;
-proto.monthsShort = localeMonthsShort;
-proto.monthsParse = localeMonthsParse;
-proto.monthsRegex = monthsRegex;
-proto.monthsShortRegex = monthsShortRegex;
-
-// Week
-import {
- localeWeek,
- localeFirstDayOfYear,
- localeFirstDayOfWeek,
-} from '../units/week';
-proto.week = localeWeek;
-proto.firstDayOfYear = localeFirstDayOfYear;
-proto.firstDayOfWeek = localeFirstDayOfWeek;
-
-// Day of Week
-import {
- localeWeekdaysParse,
- localeWeekdays,
- localeWeekdaysMin,
- localeWeekdaysShort,
- weekdaysRegex,
- weekdaysShortRegex,
- weekdaysMinRegex,
-} from '../units/day-of-week';
-
-proto.weekdays = localeWeekdays;
-proto.weekdaysMin = localeWeekdaysMin;
-proto.weekdaysShort = localeWeekdaysShort;
-proto.weekdaysParse = localeWeekdaysParse;
-
-proto.weekdaysRegex = weekdaysRegex;
-proto.weekdaysShortRegex = weekdaysShortRegex;
-proto.weekdaysMinRegex = weekdaysMinRegex;
-
-// Hours
-import { localeIsPM, localeMeridiem } from '../units/hour';
-
-proto.isPM = localeIsPM;
-proto.meridiem = localeMeridiem;
diff --git a/node_modules/moment/src/lib/locale/relative.js b/node_modules/moment/src/lib/locale/relative.js
deleted file mode 100644
index 8194045..0000000
--- a/node_modules/moment/src/lib/locale/relative.js
+++ /dev/null
@@ -1,32 +0,0 @@
-export var defaultRelativeTime = {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- w: 'a week',
- ww: '%d weeks',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
-};
-
-import isFunction from '../utils/is-function';
-
-export function relativeTime(number, withoutSuffix, string, isFuture) {
- var output = this._relativeTime[string];
- return isFunction(output)
- ? output(number, withoutSuffix, string, isFuture)
- : output.replace(/%d/i, number);
-}
-
-export function pastFuture(diff, output) {
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
-}
diff --git a/node_modules/moment/src/lib/locale/set.js b/node_modules/moment/src/lib/locale/set.js
deleted file mode 100644
index 3b069de..0000000
--- a/node_modules/moment/src/lib/locale/set.js
+++ /dev/null
@@ -1,56 +0,0 @@
-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;
-}