diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-11-18 23:56:25 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-11-18 23:56:25 +0100 |
commit | b23284cba28335f61595f2264685b1bbafc19183 (patch) | |
tree | 696cbfc2b5a609c636e0d1d7a3a2f9ad7a302266 /library/moment/src/lib/utils | |
parent | 0c163c4d038a4c26335af1bde366d8ef9e53c464 (diff) | |
download | volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.tar.gz volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.tar.bz2 volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.zip |
move moment.min.js and remove unneeded files
Diffstat (limited to 'library/moment/src/lib/utils')
-rw-r--r-- | library/moment/src/lib/utils/abs-ceil.js | 7 | ||||
-rw-r--r-- | library/moment/src/lib/utils/abs-floor.js | 7 | ||||
-rw-r--r-- | library/moment/src/lib/utils/compare-arrays.js | 16 | ||||
-rw-r--r-- | library/moment/src/lib/utils/defaults.js | 10 | ||||
-rw-r--r-- | library/moment/src/lib/utils/deprecate.js | 32 | ||||
-rw-r--r-- | library/moment/src/lib/utils/extend.js | 19 | ||||
-rw-r--r-- | library/moment/src/lib/utils/has-own-prop.js | 3 | ||||
-rw-r--r-- | library/moment/src/lib/utils/hooks.js | 13 | ||||
-rw-r--r-- | library/moment/src/lib/utils/is-array.js | 3 | ||||
-rw-r--r-- | library/moment/src/lib/utils/is-date.js | 3 | ||||
-rw-r--r-- | library/moment/src/lib/utils/map.js | 7 | ||||
-rw-r--r-- | library/moment/src/lib/utils/to-int.js | 12 | ||||
-rw-r--r-- | library/moment/src/lib/utils/zero-fill.js | 7 |
13 files changed, 0 insertions, 139 deletions
diff --git a/library/moment/src/lib/utils/abs-ceil.js b/library/moment/src/lib/utils/abs-ceil.js deleted file mode 100644 index 7cf93290c..000000000 --- a/library/moment/src/lib/utils/abs-ceil.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function absCeil (number) { - if (number < 0) { - return Math.floor(number); - } else { - return Math.ceil(number); - } -} diff --git a/library/moment/src/lib/utils/abs-floor.js b/library/moment/src/lib/utils/abs-floor.js deleted file mode 100644 index 8ba131831..000000000 --- a/library/moment/src/lib/utils/abs-floor.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function absFloor (number) { - if (number < 0) { - return Math.ceil(number); - } else { - return Math.floor(number); - } -} diff --git a/library/moment/src/lib/utils/compare-arrays.js b/library/moment/src/lib/utils/compare-arrays.js deleted file mode 100644 index 2eb274bef..000000000 --- a/library/moment/src/lib/utils/compare-arrays.js +++ /dev/null @@ -1,16 +0,0 @@ -import toInt from './to-int'; - -// compare two arrays, return the number of differences -export default function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if ((dontConvert && array1[i] !== array2[i]) || - (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { - diffs++; - } - } - return diffs + lengthDiff; -} diff --git a/library/moment/src/lib/utils/defaults.js b/library/moment/src/lib/utils/defaults.js deleted file mode 100644 index 45c5e8794..000000000 --- a/library/moment/src/lib/utils/defaults.js +++ /dev/null @@ -1,10 +0,0 @@ -// Pick the first defined of two or three arguments. -export default function defaults(a, b, c) { - if (a != null) { - return a; - } - if (b != null) { - return b; - } - return c; -} diff --git a/library/moment/src/lib/utils/deprecate.js b/library/moment/src/lib/utils/deprecate.js deleted file mode 100644 index df4286b84..000000000 --- a/library/moment/src/lib/utils/deprecate.js +++ /dev/null @@ -1,32 +0,0 @@ -import extend from './extend'; -import { hooks } from './hooks'; - -function warn(msg) { - if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { - console.warn('Deprecation warning: ' + msg); - } -} - -export function deprecate(msg, fn) { - var firstTime = true; - - return extend(function () { - if (firstTime) { - warn(msg + '\n' + (new Error()).stack); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); -} - -var deprecations = {}; - -export function deprecateSimple(name, msg) { - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; - } -} - -hooks.suppressDeprecationWarnings = false; - diff --git a/library/moment/src/lib/utils/extend.js b/library/moment/src/lib/utils/extend.js deleted file mode 100644 index ba74a0bf1..000000000 --- a/library/moment/src/lib/utils/extend.js +++ /dev/null @@ -1,19 +0,0 @@ -import hasOwnProp from './has-own-prop'; - -export default function extend(a, b) { - for (var i in b) { - if (hasOwnProp(b, i)) { - a[i] = b[i]; - } - } - - if (hasOwnProp(b, 'toString')) { - a.toString = b.toString; - } - - if (hasOwnProp(b, 'valueOf')) { - a.valueOf = b.valueOf; - } - - return a; -} diff --git a/library/moment/src/lib/utils/has-own-prop.js b/library/moment/src/lib/utils/has-own-prop.js deleted file mode 100644 index 4d2403ccb..000000000 --- a/library/moment/src/lib/utils/has-own-prop.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function hasOwnProp(a, b) { - return Object.prototype.hasOwnProperty.call(a, b); -} diff --git a/library/moment/src/lib/utils/hooks.js b/library/moment/src/lib/utils/hooks.js deleted file mode 100644 index 02a5bd3da..000000000 --- a/library/moment/src/lib/utils/hooks.js +++ /dev/null @@ -1,13 +0,0 @@ -export { hooks, setHookCallback }; - -var hookCallback; - -function hooks () { - return hookCallback.apply(null, arguments); -} - -// This is done to register the method called with moment() -// without creating circular dependencies. -function setHookCallback (callback) { - hookCallback = callback; -} diff --git a/library/moment/src/lib/utils/is-array.js b/library/moment/src/lib/utils/is-array.js deleted file mode 100644 index 46bd6c68b..000000000 --- a/library/moment/src/lib/utils/is-array.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function isArray(input) { - return Object.prototype.toString.call(input) === '[object Array]'; -} diff --git a/library/moment/src/lib/utils/is-date.js b/library/moment/src/lib/utils/is-date.js deleted file mode 100644 index 69c4d0e9c..000000000 --- a/library/moment/src/lib/utils/is-date.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function isDate(input) { - return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; -} diff --git a/library/moment/src/lib/utils/map.js b/library/moment/src/lib/utils/map.js deleted file mode 100644 index 1cbc5639f..000000000 --- a/library/moment/src/lib/utils/map.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function map(arr, fn) { - var res = [], i; - for (i = 0; i < arr.length; ++i) { - res.push(fn(arr[i], i)); - } - return res; -} diff --git a/library/moment/src/lib/utils/to-int.js b/library/moment/src/lib/utils/to-int.js deleted file mode 100644 index fb489416f..000000000 --- a/library/moment/src/lib/utils/to-int.js +++ /dev/null @@ -1,12 +0,0 @@ -import absFloor from './abs-floor'; - -export default function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; - - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - value = absFloor(coercedNumber); - } - - return value; -} diff --git a/library/moment/src/lib/utils/zero-fill.js b/library/moment/src/lib/utils/zero-fill.js deleted file mode 100644 index 7009ec903..000000000 --- a/library/moment/src/lib/utils/zero-fill.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function zeroFill(number, targetLength, forceSign) { - var absNumber = '' + Math.abs(number), - zerosToFill = targetLength - absNumber.length, - sign = number >= 0; - return (sign ? (forceSign ? '+' : '') : '-') + - Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; -} |