http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/baseWhile.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/baseWhile.js b/node_modules/lodash/internal/baseWhile.js new file mode 100644 index 0000000..c24e9bd --- /dev/null +++ b/node_modules/lodash/internal/baseWhile.js @@ -0,0 +1,24 @@ +var baseSlice = require('./baseSlice'); + +/** + * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, + * and `_.takeWhile` without support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile;
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/baseWrapperValue.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/baseWrapperValue.js b/node_modules/lodash/internal/baseWrapperValue.js new file mode 100644 index 0000000..629c01f --- /dev/null +++ b/node_modules/lodash/internal/baseWrapperValue.js @@ -0,0 +1,29 @@ +var LazyWrapper = require('./LazyWrapper'), + arrayPush = require('./arrayPush'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to peform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + var index = -1, + length = actions.length; + + while (++index < length) { + var action = actions[index]; + result = action.func.apply(action.thisArg, arrayPush([result], action.args)); + } + return result; +} + +module.exports = baseWrapperValue; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/binaryIndex.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/binaryIndex.js b/node_modules/lodash/internal/binaryIndex.js new file mode 100644 index 0000000..af419a2 --- /dev/null +++ b/node_modules/lodash/internal/binaryIndex.js @@ -0,0 +1,39 @@ +var binaryIndexBy = require('./binaryIndexBy'), + identity = require('../utility/identity'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * Performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function binaryIndex(array, value, retHighest) { + var low = 0, + high = array ? array.length : low; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return binaryIndexBy(array, value, identity, retHighest); +} + +module.exports = binaryIndex; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/binaryIndexBy.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/binaryIndexBy.js b/node_modules/lodash/internal/binaryIndexBy.js new file mode 100644 index 0000000..767cbd2 --- /dev/null +++ b/node_modules/lodash/internal/binaryIndexBy.js @@ -0,0 +1,57 @@ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/** + * This function is like `binaryIndex` except that it invokes `iteratee` for + * `value` and each element of `array` to compute their sort ranking. The + * iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The function invoked per iteration. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function binaryIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array ? array.length : 0, + valIsNaN = value !== value, + valIsNull = value === null, + valIsUndef = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + isDef = computed !== undefined, + isReflexive = computed === computed; + + if (valIsNaN) { + var setLow = isReflexive || retHighest; + } else if (valIsNull) { + setLow = isReflexive && isDef && (retHighest || computed != null); + } else if (valIsUndef) { + setLow = isReflexive && (retHighest || isDef); + } else if (computed == null) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = binaryIndexBy; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/bindCallback.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/bindCallback.js b/node_modules/lodash/internal/bindCallback.js new file mode 100644 index 0000000..cdc7f49 --- /dev/null +++ b/node_modules/lodash/internal/bindCallback.js @@ -0,0 +1,39 @@ +var identity = require('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/bufferClone.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/bufferClone.js b/node_modules/lodash/internal/bufferClone.js new file mode 100644 index 0000000..f3c12b8 --- /dev/null +++ b/node_modules/lodash/internal/bufferClone.js @@ -0,0 +1,20 @@ +/** Native method references. */ +var ArrayBuffer = global.ArrayBuffer, + Uint8Array = global.Uint8Array; + +/** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; +} + +module.exports = bufferClone; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/cacheIndexOf.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/cacheIndexOf.js b/node_modules/lodash/internal/cacheIndexOf.js new file mode 100644 index 0000000..09f698a --- /dev/null +++ b/node_modules/lodash/internal/cacheIndexOf.js @@ -0,0 +1,19 @@ +var isObject = require('../lang/isObject'); + +/** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ +function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; +} + +module.exports = cacheIndexOf; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/cachePush.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/cachePush.js b/node_modules/lodash/internal/cachePush.js new file mode 100644 index 0000000..ba03a15 --- /dev/null +++ b/node_modules/lodash/internal/cachePush.js @@ -0,0 +1,20 @@ +var isObject = require('../lang/isObject'); + +/** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ +function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } +} + +module.exports = cachePush; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/charsLeftIndex.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/charsLeftIndex.js b/node_modules/lodash/internal/charsLeftIndex.js new file mode 100644 index 0000000..a6d1d81 --- /dev/null +++ b/node_modules/lodash/internal/charsLeftIndex.js @@ -0,0 +1,18 @@ +/** + * Used by `_.trim` and `_.trimLeft` to get the index of the first character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the first character not found in `chars`. + */ +function charsLeftIndex(string, chars) { + var index = -1, + length = string.length; + + while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} + return index; +} + +module.exports = charsLeftIndex; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/charsRightIndex.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/charsRightIndex.js b/node_modules/lodash/internal/charsRightIndex.js new file mode 100644 index 0000000..1251dcb --- /dev/null +++ b/node_modules/lodash/internal/charsRightIndex.js @@ -0,0 +1,17 @@ +/** + * Used by `_.trim` and `_.trimRight` to get the index of the last character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the last character not found in `chars`. + */ +function charsRightIndex(string, chars) { + var index = string.length; + + while (index-- && chars.indexOf(string.charAt(index)) > -1) {} + return index; +} + +module.exports = charsRightIndex; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/compareAscending.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/compareAscending.js b/node_modules/lodash/internal/compareAscending.js new file mode 100644 index 0000000..f17b117 --- /dev/null +++ b/node_modules/lodash/internal/compareAscending.js @@ -0,0 +1,16 @@ +var baseCompareAscending = require('./baseCompareAscending'); + +/** + * Used by `_.sortBy` to compare transformed elements of a collection and stable + * sort them in ascending order. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareAscending(object, other) { + return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); +} + +module.exports = compareAscending; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/compareMultiple.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/compareMultiple.js b/node_modules/lodash/internal/compareMultiple.js new file mode 100644 index 0000000..b2139f7 --- /dev/null +++ b/node_modules/lodash/internal/compareMultiple.js @@ -0,0 +1,44 @@ +var baseCompareAscending = require('./baseCompareAscending'); + +/** + * Used by `_.sortByOrder` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise, + * a value is sorted in ascending order if its corresponding order is "asc", and + * descending if "desc". + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = baseCompareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * ((order === 'asc' || order === true) ? 1 : -1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/composeArgs.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/composeArgs.js b/node_modules/lodash/internal/composeArgs.js new file mode 100644 index 0000000..cd5a2fe --- /dev/null +++ b/node_modules/lodash/internal/composeArgs.js @@ -0,0 +1,34 @@ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders) { + var holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + leftIndex = -1, + leftLength = partials.length, + result = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + while (argsLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/composeArgsRight.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/composeArgsRight.js b/node_modules/lodash/internal/composeArgsRight.js new file mode 100644 index 0000000..38ab139 --- /dev/null +++ b/node_modules/lodash/internal/composeArgsRight.js @@ -0,0 +1,36 @@ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders) { + var holdersIndex = -1, + holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + rightIndex = -1, + rightLength = partials.length, + result = Array(argsLength + rightLength); + + while (++argsIndex < argsLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgsRight; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createAggregator.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createAggregator.js b/node_modules/lodash/internal/createAggregator.js new file mode 100644 index 0000000..c3d3cec --- /dev/null +++ b/node_modules/lodash/internal/createAggregator.js @@ -0,0 +1,35 @@ +var baseCallback = require('./baseCallback'), + baseEach = require('./baseEach'), + isArray = require('../lang/isArray'); + +/** + * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function. + * + * @private + * @param {Function} setter The function to set keys and values of the accumulator object. + * @param {Function} [initializer] The function to initialize the accumulator object. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee, thisArg) { + var result = initializer ? initializer() : {}; + iteratee = baseCallback(iteratee, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, iteratee(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, iteratee(value, key, collection), collection); + }); + } + return result; + }; +} + +module.exports = createAggregator; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createAssigner.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createAssigner.js b/node_modules/lodash/internal/createAssigner.js new file mode 100644 index 0000000..ea5a5a4 --- /dev/null +++ b/node_modules/lodash/internal/createAssigner.js @@ -0,0 +1,41 @@ +var bindCallback = require('./bindCallback'), + isIterateeCall = require('./isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createBaseEach.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createBaseEach.js b/node_modules/lodash/internal/createBaseEach.js new file mode 100644 index 0000000..b55c39b --- /dev/null +++ b/node_modules/lodash/internal/createBaseEach.js @@ -0,0 +1,31 @@ +var getLength = require('./getLength'), + isLength = require('./isLength'), + toObject = require('./toObject'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createBaseFor.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createBaseFor.js b/node_modules/lodash/internal/createBaseFor.js new file mode 100644 index 0000000..3c2cac5 --- /dev/null +++ b/node_modules/lodash/internal/createBaseFor.js @@ -0,0 +1,27 @@ +var toObject = require('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createBindWrapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createBindWrapper.js b/node_modules/lodash/internal/createBindWrapper.js new file mode 100644 index 0000000..54086ee --- /dev/null +++ b/node_modules/lodash/internal/createBindWrapper.js @@ -0,0 +1,22 @@ +var createCtorWrapper = require('./createCtorWrapper'); + +/** + * Creates a function that wraps `func` and invokes it with the `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new bound function. + */ +function createBindWrapper(func, thisArg) { + var Ctor = createCtorWrapper(func); + + function wrapper() { + var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); + } + return wrapper; +} + +module.exports = createBindWrapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createCache.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createCache.js b/node_modules/lodash/internal/createCache.js new file mode 100644 index 0000000..025e566 --- /dev/null +++ b/node_modules/lodash/internal/createCache.js @@ -0,0 +1,21 @@ +var SetCache = require('./SetCache'), + getNative = require('./getNative'); + +/** Native method references. */ +var Set = getNative(global, 'Set'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCreate = getNative(Object, 'create'); + +/** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ +function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; +} + +module.exports = createCache; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createCompounder.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createCompounder.js b/node_modules/lodash/internal/createCompounder.js new file mode 100644 index 0000000..4c75512 --- /dev/null +++ b/node_modules/lodash/internal/createCompounder.js @@ -0,0 +1,26 @@ +var deburr = require('../string/deburr'), + words = require('../string/words'); + +/** + * Creates a function that produces compound words out of the words in a + * given string. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + var index = -1, + array = words(deburr(string)), + length = array.length, + result = ''; + + while (++index < length) { + result = callback(result, array[index], index); + } + return result; + }; +} + +module.exports = createCompounder; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createCtorWrapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createCtorWrapper.js b/node_modules/lodash/internal/createCtorWrapper.js new file mode 100644 index 0000000..ffbee80 --- /dev/null +++ b/node_modules/lodash/internal/createCtorWrapper.js @@ -0,0 +1,37 @@ +var baseCreate = require('./baseCreate'), + isObject = require('../lang/isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtorWrapper(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. + // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtorWrapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createCurry.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createCurry.js b/node_modules/lodash/internal/createCurry.js new file mode 100644 index 0000000..e5ced0e --- /dev/null +++ b/node_modules/lodash/internal/createCurry.js @@ -0,0 +1,23 @@ +var createWrapper = require('./createWrapper'), + isIterateeCall = require('./isIterateeCall'); + +/** + * Creates a `_.curry` or `_.curryRight` function. + * + * @private + * @param {boolean} flag The curry bit flag. + * @returns {Function} Returns the new curry function. + */ +function createCurry(flag) { + function curryFunc(func, arity, guard) { + if (guard && isIterateeCall(func, arity, guard)) { + arity = undefined; + } + var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryFunc.placeholder; + return result; + } + return curryFunc; +} + +module.exports = createCurry; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createDefaults.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createDefaults.js b/node_modules/lodash/internal/createDefaults.js new file mode 100644 index 0000000..5663bcb --- /dev/null +++ b/node_modules/lodash/internal/createDefaults.js @@ -0,0 +1,22 @@ +var restParam = require('../function/restParam'); + +/** + * Creates a `_.defaults` or `_.defaultsDeep` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @param {Function} customizer The function to customize assigned values. + * @returns {Function} Returns the new defaults function. + */ +function createDefaults(assigner, customizer) { + return restParam(function(args) { + var object = args[0]; + if (object == null) { + return object; + } + args.push(customizer); + return assigner.apply(undefined, args); + }); +} + +module.exports = createDefaults; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createExtremum.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createExtremum.js b/node_modules/lodash/internal/createExtremum.js new file mode 100644 index 0000000..5c4003e --- /dev/null +++ b/node_modules/lodash/internal/createExtremum.js @@ -0,0 +1,33 @@ +var arrayExtremum = require('./arrayExtremum'), + baseCallback = require('./baseCallback'), + baseExtremum = require('./baseExtremum'), + isArray = require('../lang/isArray'), + isIterateeCall = require('./isIterateeCall'), + toIterable = require('./toIterable'); + +/** + * Creates a `_.max` or `_.min` function. + * + * @private + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {Function} Returns the new extremum function. + */ +function createExtremum(comparator, exValue) { + return function(collection, iteratee, thisArg) { + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + iteratee = baseCallback(iteratee, thisArg, 3); + if (iteratee.length == 1) { + collection = isArray(collection) ? collection : toIterable(collection); + var result = arrayExtremum(collection, iteratee, comparator, exValue); + if (!(collection.length && result === exValue)) { + return result; + } + } + return baseExtremum(collection, iteratee, comparator, exValue); + }; +} + +module.exports = createExtremum; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createFind.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createFind.js b/node_modules/lodash/internal/createFind.js new file mode 100644 index 0000000..29bf580 --- /dev/null +++ b/node_modules/lodash/internal/createFind.js @@ -0,0 +1,25 @@ +var baseCallback = require('./baseCallback'), + baseFind = require('./baseFind'), + baseFindIndex = require('./baseFindIndex'), + isArray = require('../lang/isArray'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ +function createFind(eachFunc, fromRight) { + return function(collection, predicate, thisArg) { + predicate = baseCallback(predicate, thisArg, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate, fromRight); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, eachFunc); + }; +} + +module.exports = createFind; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createFindIndex.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createFindIndex.js b/node_modules/lodash/internal/createFindIndex.js new file mode 100644 index 0000000..3947bea --- /dev/null +++ b/node_modules/lodash/internal/createFindIndex.js @@ -0,0 +1,21 @@ +var baseCallback = require('./baseCallback'), + baseFindIndex = require('./baseFindIndex'); + +/** + * Creates a `_.findIndex` or `_.findLastIndex` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ +function createFindIndex(fromRight) { + return function(array, predicate, thisArg) { + if (!(array && array.length)) { + return -1; + } + predicate = baseCallback(predicate, thisArg, 3); + return baseFindIndex(array, predicate, fromRight); + }; +} + +module.exports = createFindIndex; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createFindKey.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createFindKey.js b/node_modules/lodash/internal/createFindKey.js new file mode 100644 index 0000000..0ce85e4 --- /dev/null +++ b/node_modules/lodash/internal/createFindKey.js @@ -0,0 +1,18 @@ +var baseCallback = require('./baseCallback'), + baseFind = require('./baseFind'); + +/** + * Creates a `_.findKey` or `_.findLastKey` function. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new find function. + */ +function createFindKey(objectFunc) { + return function(object, predicate, thisArg) { + predicate = baseCallback(predicate, thisArg, 3); + return baseFind(object, predicate, objectFunc, true); + }; +} + +module.exports = createFindKey; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createFlow.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createFlow.js b/node_modules/lodash/internal/createFlow.js new file mode 100644 index 0000000..52ab388 --- /dev/null +++ b/node_modules/lodash/internal/createFlow.js @@ -0,0 +1,74 @@ +var LodashWrapper = require('./LodashWrapper'), + getData = require('./getData'), + getFuncName = require('./getFuncName'), + isArray = require('../lang/isArray'), + isLaziable = require('./isLaziable'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_FLAG = 8, + PARTIAL_FLAG = 32, + ARY_FLAG = 128, + REARG_FLAG = 256; + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return function() { + var wrapper, + length = arguments.length, + index = fromRight ? length : -1, + leftIndex = 0, + funcs = Array(length); + + while ((fromRight ? index-- : ++index < length)) { + var func = funcs[leftIndex++] = arguments[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { + wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? -1 : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }; +} + +module.exports = createFlow; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createForEach.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createForEach.js b/node_modules/lodash/internal/createForEach.js new file mode 100644 index 0000000..2aad11c --- /dev/null +++ b/node_modules/lodash/internal/createForEach.js @@ -0,0 +1,20 @@ +var bindCallback = require('./bindCallback'), + isArray = require('../lang/isArray'); + +/** + * Creates a function for `_.forEach` or `_.forEachRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ +function createForEach(arrayFunc, eachFunc) { + return function(collection, iteratee, thisArg) { + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee) + : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); + }; +} + +module.exports = createForEach; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createForIn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createForIn.js b/node_modules/lodash/internal/createForIn.js new file mode 100644 index 0000000..f63ffa0 --- /dev/null +++ b/node_modules/lodash/internal/createForIn.js @@ -0,0 +1,20 @@ +var bindCallback = require('./bindCallback'), + keysIn = require('../object/keysIn'); + +/** + * Creates a function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ +function createForIn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee, keysIn); + }; +} + +module.exports = createForIn; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createForOwn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createForOwn.js b/node_modules/lodash/internal/createForOwn.js new file mode 100644 index 0000000..b9a83c3 --- /dev/null +++ b/node_modules/lodash/internal/createForOwn.js @@ -0,0 +1,19 @@ +var bindCallback = require('./bindCallback'); + +/** + * Creates a function for `_.forOwn` or `_.forOwnRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ +function createForOwn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee); + }; +} + +module.exports = createForOwn; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createHybridWrapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createHybridWrapper.js b/node_modules/lodash/internal/createHybridWrapper.js new file mode 100644 index 0000000..5382fa0 --- /dev/null +++ b/node_modules/lodash/internal/createHybridWrapper.js @@ -0,0 +1,111 @@ +var arrayCopy = require('./arrayCopy'), + composeArgs = require('./composeArgs'), + composeArgsRight = require('./composeArgsRight'), + createCtorWrapper = require('./createCtorWrapper'), + isLaziable = require('./isLaziable'), + reorder = require('./reorder'), + replaceHolders = require('./replaceHolders'), + setData = require('./setData'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that wraps `func` and invokes it with optional `this` + * binding of, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & ARY_FLAG, + isBind = bitmask & BIND_FLAG, + isBindKey = bitmask & BIND_KEY_FLAG, + isCurry = bitmask & CURRY_FLAG, + isCurryBound = bitmask & CURRY_BOUND_FLAG, + isCurryRight = bitmask & CURRY_RIGHT_FLAG, + Ctor = isBindKey ? undefined : createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it to other functions. + var length = arguments.length, + index = length, + args = Array(length); + + while (index--) { + args[index] = arguments[index]; + } + if (partials) { + args = composeArgs(args, partials, holders); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight); + } + if (isCurry || isCurryRight) { + var placeholder = wrapper.placeholder, + argsHolders = replaceHolders(args, placeholder); + + length -= argsHolders.length; + if (length < arity) { + var newArgPos = argPos ? arrayCopy(argPos) : undefined, + newArity = nativeMax(arity - length, 0), + newsHolders = isCurry ? argsHolders : undefined, + newHoldersRight = isCurry ? undefined : argsHolders, + newPartials = isCurry ? args : undefined, + newPartialsRight = isCurry ? undefined : args; + + bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + + if (!isCurryBound) { + bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + } + var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], + result = createHybridWrapper.apply(undefined, newData); + + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return result; + } + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + if (argPos) { + args = reorder(args, argPos); + } + if (isAry && ary < args.length) { + args.length = ary; + } + if (this && this !== global && this instanceof wrapper) { + fn = Ctor || createCtorWrapper(func); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybridWrapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createObjectMapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createObjectMapper.js b/node_modules/lodash/internal/createObjectMapper.js new file mode 100644 index 0000000..06d6a87 --- /dev/null +++ b/node_modules/lodash/internal/createObjectMapper.js @@ -0,0 +1,26 @@ +var baseCallback = require('./baseCallback'), + baseForOwn = require('./baseForOwn'); + +/** + * Creates a function for `_.mapKeys` or `_.mapValues`. + * + * @private + * @param {boolean} [isMapKeys] Specify mapping keys instead of values. + * @returns {Function} Returns the new map function. + */ +function createObjectMapper(isMapKeys) { + return function(object, iteratee, thisArg) { + var result = {}; + iteratee = baseCallback(iteratee, thisArg, 3); + + baseForOwn(object, function(value, key, object) { + var mapped = iteratee(value, key, object); + key = isMapKeys ? mapped : key; + value = isMapKeys ? value : mapped; + result[key] = value; + }); + return result; + }; +} + +module.exports = createObjectMapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createPadDir.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createPadDir.js b/node_modules/lodash/internal/createPadDir.js new file mode 100644 index 0000000..da0ebf1 --- /dev/null +++ b/node_modules/lodash/internal/createPadDir.js @@ -0,0 +1,18 @@ +var baseToString = require('./baseToString'), + createPadding = require('./createPadding'); + +/** + * Creates a function for `_.padLeft` or `_.padRight`. + * + * @private + * @param {boolean} [fromRight] Specify padding from the right. + * @returns {Function} Returns the new pad function. + */ +function createPadDir(fromRight) { + return function(string, length, chars) { + string = baseToString(string); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); + }; +} + +module.exports = createPadDir; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createPadding.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createPadding.js b/node_modules/lodash/internal/createPadding.js new file mode 100644 index 0000000..810dc24 --- /dev/null +++ b/node_modules/lodash/internal/createPadding.js @@ -0,0 +1,29 @@ +var repeat = require('../string/repeat'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeIsFinite = global.isFinite; + +/** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ +function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); +} + +module.exports = createPadding; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createPartial.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createPartial.js b/node_modules/lodash/internal/createPartial.js new file mode 100644 index 0000000..7533275 --- /dev/null +++ b/node_modules/lodash/internal/createPartial.js @@ -0,0 +1,20 @@ +var createWrapper = require('./createWrapper'), + replaceHolders = require('./replaceHolders'), + restParam = require('../function/restParam'); + +/** + * Creates a `_.partial` or `_.partialRight` function. + * + * @private + * @param {boolean} flag The partial bit flag. + * @returns {Function} Returns the new partial function. + */ +function createPartial(flag) { + var partialFunc = restParam(function(func, partials) { + var holders = replaceHolders(partials, partialFunc.placeholder); + return createWrapper(func, flag, undefined, partials, holders); + }); + return partialFunc; +} + +module.exports = createPartial; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createPartialWrapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createPartialWrapper.js b/node_modules/lodash/internal/createPartialWrapper.js new file mode 100644 index 0000000..b19f9f0 --- /dev/null +++ b/node_modules/lodash/internal/createPartialWrapper.js @@ -0,0 +1,43 @@ +var createCtorWrapper = require('./createCtorWrapper'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` and invokes it with the optional `this` + * binding of `thisArg` and the `partials` prepended to those provided to + * the wrapper. + * + * @private + * @param {Function} func The function to partially apply arguments to. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to the new function. + * @returns {Function} Returns the new bound function. + */ +function createPartialWrapper(func, bitmask, thisArg, partials) { + var isBind = bitmask & BIND_FLAG, + Ctor = createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it `func`. + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartialWrapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createReduce.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createReduce.js b/node_modules/lodash/internal/createReduce.js new file mode 100644 index 0000000..816f4ce --- /dev/null +++ b/node_modules/lodash/internal/createReduce.js @@ -0,0 +1,22 @@ +var baseCallback = require('./baseCallback'), + baseReduce = require('./baseReduce'), + isArray = require('../lang/isArray'); + +/** + * Creates a function for `_.reduce` or `_.reduceRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ +function createReduce(arrayFunc, eachFunc) { + return function(collection, iteratee, accumulator, thisArg) { + var initFromArray = arguments.length < 3; + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee, accumulator, initFromArray) + : baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); + }; +} + +module.exports = createReduce; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createRound.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createRound.js b/node_modules/lodash/internal/createRound.js new file mode 100644 index 0000000..21240ef --- /dev/null +++ b/node_modules/lodash/internal/createRound.js @@ -0,0 +1,23 @@ +/** Native method references. */ +var pow = Math.pow; + +/** + * Creates a `_.ceil`, `_.floor`, or `_.round` function. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + precision = precision === undefined ? 0 : (+precision || 0); + if (precision) { + precision = pow(10, precision); + return func(number * precision) / precision; + } + return func(number); + }; +} + +module.exports = createRound; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createSortedIndex.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createSortedIndex.js b/node_modules/lodash/internal/createSortedIndex.js new file mode 100644 index 0000000..86c7852 --- /dev/null +++ b/node_modules/lodash/internal/createSortedIndex.js @@ -0,0 +1,20 @@ +var baseCallback = require('./baseCallback'), + binaryIndex = require('./binaryIndex'), + binaryIndexBy = require('./binaryIndexBy'); + +/** + * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. + * + * @private + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {Function} Returns the new index function. + */ +function createSortedIndex(retHighest) { + return function(array, value, iteratee, thisArg) { + return iteratee == null + ? binaryIndex(array, value, retHighest) + : binaryIndexBy(array, value, baseCallback(iteratee, thisArg, 1), retHighest); + }; +} + +module.exports = createSortedIndex; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/createWrapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/createWrapper.js b/node_modules/lodash/internal/createWrapper.js new file mode 100644 index 0000000..ea7a9b1 --- /dev/null +++ b/node_modules/lodash/internal/createWrapper.js @@ -0,0 +1,86 @@ +var baseSetData = require('./baseSetData'), + createBindWrapper = require('./createBindWrapper'), + createHybridWrapper = require('./createHybridWrapper'), + createPartialWrapper = require('./createPartialWrapper'), + getData = require('./getData'), + mergeData = require('./mergeData'), + setData = require('./setData'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64; + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + length -= (holders ? holders.length : 0); + if (bitmask & PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func), + newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; + + if (data) { + mergeData(newData, data); + bitmask = newData[1]; + arity = newData[9]; + } + newData[9] = arity == null + ? (isBindKey ? 0 : func.length) + : (nativeMax(arity - length, 0) || 0); + + if (bitmask == BIND_FLAG) { + var result = createBindWrapper(newData[0], newData[2]); + } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { + result = createPartialWrapper.apply(undefined, newData); + } else { + result = createHybridWrapper.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setter(result, newData); +} + +module.exports = createWrapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/deburrLetter.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/deburrLetter.js b/node_modules/lodash/internal/deburrLetter.js new file mode 100644 index 0000000..e559dbe --- /dev/null +++ b/node_modules/lodash/internal/deburrLetter.js @@ -0,0 +1,33 @@ +/** Used to map latin-1 supplementary letters to basic latin letters. */ +var deburredLetters = { + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss' +}; + +/** + * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +function deburrLetter(letter) { + return deburredLetters[letter]; +} + +module.exports = deburrLetter; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/equalArrays.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/equalArrays.js b/node_modules/lodash/internal/equalArrays.js new file mode 100644 index 0000000..e0bb2d3 --- /dev/null +++ b/node_modules/lodash/internal/equalArrays.js @@ -0,0 +1,51 @@ +var arraySome = require('./arraySome'); + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +module.exports = equalArrays; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/equalByTag.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/equalByTag.js b/node_modules/lodash/internal/equalByTag.js new file mode 100644 index 0000000..d25c8e1 --- /dev/null +++ b/node_modules/lodash/internal/equalByTag.js @@ -0,0 +1,48 @@ +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; +} + +module.exports = equalByTag; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/equalObjects.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/equalObjects.js b/node_modules/lodash/internal/equalObjects.js new file mode 100644 index 0000000..1297a3b --- /dev/null +++ b/node_modules/lodash/internal/equalObjects.js @@ -0,0 +1,67 @@ +var keys = require('../object/keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +module.exports = equalObjects; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/escapeHtmlChar.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/escapeHtmlChar.js b/node_modules/lodash/internal/escapeHtmlChar.js new file mode 100644 index 0000000..b21e452 --- /dev/null +++ b/node_modules/lodash/internal/escapeHtmlChar.js @@ -0,0 +1,22 @@ +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeHtmlChar(chr) { + return htmlEscapes[chr]; +} + +module.exports = escapeHtmlChar; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/escapeRegExpChar.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/escapeRegExpChar.js b/node_modules/lodash/internal/escapeRegExpChar.js new file mode 100644 index 0000000..8427de0 --- /dev/null +++ b/node_modules/lodash/internal/escapeRegExpChar.js @@ -0,0 +1,38 @@ +/** Used to escape characters for inclusion in compiled regexes. */ +var regexpEscapes = { + '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34', + '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39', + 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46', + 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66', + 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78' +}; + +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes. + * + * @private + * @param {string} chr The matched character to escape. + * @param {string} leadingChar The capture group for a leading character. + * @param {string} whitespaceChar The capture group for a whitespace character. + * @returns {string} Returns the escaped character. + */ +function escapeRegExpChar(chr, leadingChar, whitespaceChar) { + if (leadingChar) { + chr = regexpEscapes[chr]; + } else if (whitespaceChar) { + chr = stringEscapes[chr]; + } + return '\\' + chr; +} + +module.exports = escapeRegExpChar; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/escapeStringChar.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/escapeStringChar.js b/node_modules/lodash/internal/escapeStringChar.js new file mode 100644 index 0000000..44eca96 --- /dev/null +++ b/node_modules/lodash/internal/escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/getData.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/getData.js b/node_modules/lodash/internal/getData.js new file mode 100644 index 0000000..5bb4f46 --- /dev/null +++ b/node_modules/lodash/internal/getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./metaMap'), + noop = require('../utility/noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/getFuncName.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/getFuncName.js b/node_modules/lodash/internal/getFuncName.js new file mode 100644 index 0000000..ed92867 --- /dev/null +++ b/node_modules/lodash/internal/getFuncName.js @@ -0,0 +1,25 @@ +var realNames = require('./realNames'); + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = array ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/getLength.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/getLength.js b/node_modules/lodash/internal/getLength.js new file mode 100644 index 0000000..48d75ae --- /dev/null +++ b/node_modules/lodash/internal/getLength.js @@ -0,0 +1,15 @@ +var baseProperty = require('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/getMatchData.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/getMatchData.js b/node_modules/lodash/internal/getMatchData.js new file mode 100644 index 0000000..6d235b9 --- /dev/null +++ b/node_modules/lodash/internal/getMatchData.js @@ -0,0 +1,21 @@ +var isStrictComparable = require('./isStrictComparable'), + pairs = require('../object/pairs'); + +/** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; +} + +module.exports = getMatchData; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/getNative.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/getNative.js b/node_modules/lodash/internal/getNative.js new file mode 100644 index 0000000..bceb317 --- /dev/null +++ b/node_modules/lodash/internal/getNative.js @@ -0,0 +1,16 @@ +var isNative = require('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/getView.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/getView.js b/node_modules/lodash/internal/getView.js new file mode 100644 index 0000000..f49ec6d --- /dev/null +++ b/node_modules/lodash/internal/getView.js @@ -0,0 +1,33 @@ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/indexOfNaN.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/indexOfNaN.js b/node_modules/lodash/internal/indexOfNaN.js new file mode 100644 index 0000000..05b8207 --- /dev/null +++ b/node_modules/lodash/internal/indexOfNaN.js @@ -0,0 +1,23 @@ +/** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ +function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; +} + +module.exports = indexOfNaN; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/initCloneArray.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/initCloneArray.js b/node_modules/lodash/internal/initCloneArray.js new file mode 100644 index 0000000..c92dfa2 --- /dev/null +++ b/node_modules/lodash/internal/initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/initCloneByTag.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/initCloneByTag.js b/node_modules/lodash/internal/initCloneByTag.js new file mode 100644 index 0000000..8e3afc6 --- /dev/null +++ b/node_modules/lodash/internal/initCloneByTag.js @@ -0,0 +1,63 @@ +var bufferClone = require('./bufferClone'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; +} + +module.exports = initCloneByTag; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/initCloneObject.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/initCloneObject.js b/node_modules/lodash/internal/initCloneObject.js new file mode 100644 index 0000000..48c4a23 --- /dev/null +++ b/node_modules/lodash/internal/initCloneObject.js @@ -0,0 +1,16 @@ +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; +} + +module.exports = initCloneObject; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/invokePath.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/invokePath.js b/node_modules/lodash/internal/invokePath.js new file mode 100644 index 0000000..935110f --- /dev/null +++ b/node_modules/lodash/internal/invokePath.js @@ -0,0 +1,26 @@ +var baseGet = require('./baseGet'), + baseSlice = require('./baseSlice'), + isKey = require('./isKey'), + last = require('../array/last'), + toPath = require('./toPath'); + +/** + * Invokes the method at `path` on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function invokePath(object, path, args) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + path = last(path); + } + var func = object == null ? object : object[path]; + return func == null ? undefined : func.apply(object, args); +} + +module.exports = invokePath; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/isArrayLike.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/isArrayLike.js b/node_modules/lodash/internal/isArrayLike.js new file mode 100644 index 0000000..72443cd --- /dev/null +++ b/node_modules/lodash/internal/isArrayLike.js @@ -0,0 +1,15 @@ +var getLength = require('./getLength'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash/internal/isIndex.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/internal/isIndex.js b/node_modules/lodash/internal/isIndex.js new file mode 100644 index 0000000..469164b --- /dev/null +++ b/node_modules/lodash/internal/isIndex.js @@ -0,0 +1,24 @@ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
