Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 744FE18DA8 for ; Fri, 26 Feb 2016 21:30:28 +0000 (UTC) Received: (qmail 46419 invoked by uid 500); 26 Feb 2016 21:30:28 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 46311 invoked by uid 500); 26 Feb 2016 21:30:28 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 45622 invoked by uid 99); 26 Feb 2016 21:30:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Feb 2016 21:30:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 20CB8E0418; Fri, 26 Feb 2016 21:30:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: steven@apache.org To: commits@cordova.apache.org Date: Fri, 26 Feb 2016 21:30:35 -0000 Message-Id: <27d745cec5fa4a19ab7b5d23102a832a@git.apache.org> In-Reply-To: <6cf8d3cc88be46f3a0499898f7aafb18@git.apache.org> References: <6cf8d3cc88be46f3a0499898f7aafb18@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/60] [abbrv] [partial] android commit: updated cordova-common dependnecy to 1.1.0 http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/math/min.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/math/min.js b/node_modules/lodash/math/min.js new file mode 100644 index 0000000..6d92d4f --- /dev/null +++ b/node_modules/lodash/math/min.js @@ -0,0 +1,56 @@ +var createExtremum = require('../internal/createExtremum'), + lt = require('../lang/lt'); + +/** Used as references for `-Infinity` and `Infinity`. */ +var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + +/** + * Gets the minimum value of `collection`. If `collection` is empty or falsey + * `Infinity` is returned. If an iteratee function is provided it's invoked + * for each value in `collection` to generate the criterion by which the value + * is ranked. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => Infinity + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.min(users, function(chr) { + * return chr.age; + * }); + * // => { 'user': 'barney', 'age': 36 } + * + * // using the `_.property` callback shorthand + * _.min(users, 'age'); + * // => { 'user': 'barney', 'age': 36 } + */ +var min = createExtremum(lt, POSITIVE_INFINITY); + +module.exports = min; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/math/round.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/math/round.js b/node_modules/lodash/math/round.js new file mode 100644 index 0000000..5c69d0c --- /dev/null +++ b/node_modules/lodash/math/round.js @@ -0,0 +1,25 @@ +var createRound = require('../internal/createRound'); + +/** + * Calculates `n` rounded to `precision`. + * + * @static + * @memberOf _ + * @category Math + * @param {number} n The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ +var round = createRound('round'); + +module.exports = round; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/math/sum.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/math/sum.js b/node_modules/lodash/math/sum.js new file mode 100644 index 0000000..114ff1b --- /dev/null +++ b/node_modules/lodash/math/sum.js @@ -0,0 +1,50 @@ +var arraySum = require('../internal/arraySum'), + baseCallback = require('../internal/baseCallback'), + baseSum = require('../internal/baseSum'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'), + toIterable = require('../internal/toIterable'); + +/** + * Gets the sum of the values in `collection`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 6]); + * // => 10 + * + * _.sum({ 'a': 4, 'b': 6 }); + * // => 10 + * + * var objects = [ + * { 'n': 4 }, + * { 'n': 6 } + * ]; + * + * _.sum(objects, function(object) { + * return object.n; + * }); + * // => 10 + * + * // using the `_.property` callback shorthand + * _.sum(objects, 'n'); + * // => 10 + */ +function sum(collection, iteratee, thisArg) { + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + iteratee = baseCallback(iteratee, thisArg, 3); + return iteratee.length == 1 + ? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee) + : baseSum(collection, iteratee); +} + +module.exports = sum; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/number.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/number.js b/node_modules/lodash/number.js new file mode 100644 index 0000000..afab9d9 --- /dev/null +++ b/node_modules/lodash/number.js @@ -0,0 +1,4 @@ +module.exports = { + 'inRange': require('./number/inRange'), + 'random': require('./number/random') +}; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/number/inRange.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/number/inRange.js b/node_modules/lodash/number/inRange.js new file mode 100644 index 0000000..30bf798 --- /dev/null +++ b/node_modules/lodash/number/inRange.js @@ -0,0 +1,47 @@ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Checks if `n` is between `start` and up to but not including, `end`. If + * `end` is not specified it's set to `start` with `start` then set to `0`. + * + * @static + * @memberOf _ + * @category Number + * @param {number} n The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `n` is in the range, else `false`. + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + */ +function inRange(value, start, end) { + start = +start || 0; + if (end === undefined) { + end = start; + start = 0; + } else { + end = +end || 0; + } + return value >= nativeMin(start, end) && value < nativeMax(start, end); +} + +module.exports = inRange; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/number/random.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/number/random.js b/node_modules/lodash/number/random.js new file mode 100644 index 0000000..589d74e --- /dev/null +++ b/node_modules/lodash/number/random.js @@ -0,0 +1,70 @@ +var baseRandom = require('../internal/baseRandom'), + isIterateeCall = require('../internal/isIterateeCall'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min, + nativeRandom = Math.random; + +/** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number is returned. + * If `floating` is `true`, or either `min` or `max` are floats, a floating-point + * number is returned instead of an integer. + * + * @static + * @memberOf _ + * @category Number + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ +function random(min, max, floating) { + if (floating && isIterateeCall(min, max, floating)) { + max = floating = undefined; + } + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (noMax && typeof min == 'boolean') { + floating = min; + min = 1; + } + else if (typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + noMax = false; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); + } + return baseRandom(min, max); +} + +module.exports = random; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object.js b/node_modules/lodash/object.js new file mode 100644 index 0000000..4beb005 --- /dev/null +++ b/node_modules/lodash/object.js @@ -0,0 +1,31 @@ +module.exports = { + 'assign': require('./object/assign'), + 'create': require('./object/create'), + 'defaults': require('./object/defaults'), + 'defaultsDeep': require('./object/defaultsDeep'), + 'extend': require('./object/extend'), + 'findKey': require('./object/findKey'), + 'findLastKey': require('./object/findLastKey'), + 'forIn': require('./object/forIn'), + 'forInRight': require('./object/forInRight'), + 'forOwn': require('./object/forOwn'), + 'forOwnRight': require('./object/forOwnRight'), + 'functions': require('./object/functions'), + 'get': require('./object/get'), + 'has': require('./object/has'), + 'invert': require('./object/invert'), + 'keys': require('./object/keys'), + 'keysIn': require('./object/keysIn'), + 'mapKeys': require('./object/mapKeys'), + 'mapValues': require('./object/mapValues'), + 'merge': require('./object/merge'), + 'methods': require('./object/methods'), + 'omit': require('./object/omit'), + 'pairs': require('./object/pairs'), + 'pick': require('./object/pick'), + 'result': require('./object/result'), + 'set': require('./object/set'), + 'transform': require('./object/transform'), + 'values': require('./object/values'), + 'valuesIn': require('./object/valuesIn') +}; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/assign.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/assign.js b/node_modules/lodash/object/assign.js new file mode 100644 index 0000000..4a765ed --- /dev/null +++ b/node_modules/lodash/object/assign.js @@ -0,0 +1,43 @@ +var assignWith = require('../internal/assignWith'), + baseAssign = require('../internal/baseAssign'), + createAssigner = require('../internal/createAssigner'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it's invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ +var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); +}); + +module.exports = assign; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/create.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/create.js b/node_modules/lodash/object/create.js new file mode 100644 index 0000000..176294f --- /dev/null +++ b/node_modules/lodash/object/create.js @@ -0,0 +1,47 @@ +var baseAssign = require('../internal/baseAssign'), + baseCreate = require('../internal/baseCreate'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; +} + +module.exports = create; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/defaults.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/defaults.js b/node_modules/lodash/object/defaults.js new file mode 100644 index 0000000..c05011e --- /dev/null +++ b/node_modules/lodash/object/defaults.js @@ -0,0 +1,25 @@ +var assign = require('./assign'), + assignDefaults = require('../internal/assignDefaults'), + createDefaults = require('../internal/createDefaults'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object for all destination properties that resolve to `undefined`. Once a + * property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ +var defaults = createDefaults(assign, assignDefaults); + +module.exports = defaults; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/defaultsDeep.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/defaultsDeep.js b/node_modules/lodash/object/defaultsDeep.js new file mode 100644 index 0000000..ec6e687 --- /dev/null +++ b/node_modules/lodash/object/defaultsDeep.js @@ -0,0 +1,25 @@ +var createDefaults = require('../internal/createDefaults'), + merge = require('./merge'), + mergeDefaults = require('../internal/mergeDefaults'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); + * // => { 'user': { 'name': 'barney', 'age': 36 } } + * + */ +var defaultsDeep = createDefaults(merge, mergeDefaults); + +module.exports = defaultsDeep; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/extend.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/extend.js b/node_modules/lodash/object/extend.js new file mode 100644 index 0000000..dd0ca94 --- /dev/null +++ b/node_modules/lodash/object/extend.js @@ -0,0 +1 @@ +module.exports = require('./assign'); http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/findKey.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/findKey.js b/node_modules/lodash/object/findKey.js new file mode 100644 index 0000000..1359df3 --- /dev/null +++ b/node_modules/lodash/object/findKey.js @@ -0,0 +1,54 @@ +var baseForOwn = require('../internal/baseForOwn'), + createFindKey = require('../internal/createFindKey'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (iteration order is not guaranteed) + * + * // using the `_.matches` callback shorthand + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.findKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findKey(users, 'active'); + * // => 'barney' + */ +var findKey = createFindKey(baseForOwn); + +module.exports = findKey; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/findLastKey.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/findLastKey.js b/node_modules/lodash/object/findLastKey.js new file mode 100644 index 0000000..42893a4 --- /dev/null +++ b/node_modules/lodash/object/findLastKey.js @@ -0,0 +1,54 @@ +var baseForOwnRight = require('../internal/baseForOwnRight'), + createFindKey = require('../internal/createFindKey'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles` assuming `_.findKey` returns `barney` + * + * // using the `_.matches` callback shorthand + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +var findLastKey = createFindKey(baseForOwnRight); + +module.exports = findLastKey; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/forIn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/forIn.js b/node_modules/lodash/object/forIn.js new file mode 100644 index 0000000..52d34af --- /dev/null +++ b/node_modules/lodash/object/forIn.js @@ -0,0 +1,33 @@ +var baseFor = require('../internal/baseFor'), + createForIn = require('../internal/createForIn'); + +/** + * Iterates over own and inherited enumerable properties of an object invoking + * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) + */ +var forIn = createForIn(baseFor); + +module.exports = forIn; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/forInRight.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/forInRight.js b/node_modules/lodash/object/forInRight.js new file mode 100644 index 0000000..6780b92 --- /dev/null +++ b/node_modules/lodash/object/forInRight.js @@ -0,0 +1,31 @@ +var baseForRight = require('../internal/baseForRight'), + createForIn = require('../internal/createForIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' + */ +var forInRight = createForIn(baseForRight); + +module.exports = forInRight; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/forOwn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/forOwn.js b/node_modules/lodash/object/forOwn.js new file mode 100644 index 0000000..747bb76 --- /dev/null +++ b/node_modules/lodash/object/forOwn.js @@ -0,0 +1,33 @@ +var baseForOwn = require('../internal/baseForOwn'), + createForOwn = require('../internal/createForOwn'); + +/** + * Iterates over own enumerable properties of an object invoking `iteratee` + * for each property. The `iteratee` is bound to `thisArg` and invoked with + * three arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' and 'b' (iteration order is not guaranteed) + */ +var forOwn = createForOwn(baseForOwn); + +module.exports = forOwn; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/forOwnRight.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/forOwnRight.js b/node_modules/lodash/object/forOwnRight.js new file mode 100644 index 0000000..8122338 --- /dev/null +++ b/node_modules/lodash/object/forOwnRight.js @@ -0,0 +1,31 @@ +var baseForOwnRight = require('../internal/baseForOwnRight'), + createForOwn = require('../internal/createForOwn'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' + */ +var forOwnRight = createForOwn(baseForOwnRight); + +module.exports = forOwnRight; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/functions.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/functions.js b/node_modules/lodash/object/functions.js new file mode 100644 index 0000000..10799be --- /dev/null +++ b/node_modules/lodash/object/functions.js @@ -0,0 +1,23 @@ +var baseFunctions = require('../internal/baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from all enumerable properties, + * own and inherited, of `object`. + * + * @static + * @memberOf _ + * @alias methods + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * _.functions(_); + * // => ['after', 'ary', 'assign', ...] + */ +function functions(object) { + return baseFunctions(object, keysIn(object)); +} + +module.exports = functions; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/get.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/get.js b/node_modules/lodash/object/get.js new file mode 100644 index 0000000..7e88f1e --- /dev/null +++ b/node_modules/lodash/object/get.js @@ -0,0 +1,33 @@ +var baseGet = require('../internal/baseGet'), + toPath = require('../internal/toPath'); + +/** + * Gets the property value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, toPath(path), (path + '')); + return result === undefined ? defaultValue : result; +} + +module.exports = get; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/has.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/has.js b/node_modules/lodash/object/has.js new file mode 100644 index 0000000..f356243 --- /dev/null +++ b/node_modules/lodash/object/has.js @@ -0,0 +1,57 @@ +var baseGet = require('../internal/baseGet'), + baseSlice = require('../internal/baseSlice'), + isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('../internal/isIndex'), + isKey = require('../internal/isKey'), + isLength = require('../internal/isLength'), + last = require('../array/last'), + toPath = require('../internal/toPath'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `path` is a direct property. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + */ +function has(object, path) { + if (object == null) { + return false; + } + var result = hasOwnProperty.call(object, path); + if (!result && !isKey(path)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + path = last(path); + result = hasOwnProperty.call(object, path); + } + return result || (isLength(object.length) && isIndex(path, object.length) && + (isArray(object) || isArguments(object))); +} + +module.exports = has; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/invert.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/invert.js b/node_modules/lodash/object/invert.js new file mode 100644 index 0000000..54fb1f1 --- /dev/null +++ b/node_modules/lodash/object/invert.js @@ -0,0 +1,60 @@ +var isIterateeCall = require('../internal/isIterateeCall'), + keys = require('./keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite property + * assignments of previous values unless `multiValue` is `true`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {boolean} [multiValue] Allow multiple values per key. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + * + * // with `multiValue` + * _.invert(object, true); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ +function invert(object, multiValue, guard) { + if (guard && isIterateeCall(object, multiValue, guard)) { + multiValue = undefined; + } + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index], + value = object[key]; + + if (multiValue) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + else { + result[value] = key; + } + } + return result; +} + +module.exports = invert; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/keys.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/keys.js b/node_modules/lodash/object/keys.js new file mode 100644 index 0000000..4706fd6 --- /dev/null +++ b/node_modules/lodash/object/keys.js @@ -0,0 +1,45 @@ +var getNative = require('../internal/getNative'), + isArrayLike = require('../internal/isArrayLike'), + isObject = require('../lang/isObject'), + shimKeys = require('../internal/shimKeys'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/keysIn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/keysIn.js b/node_modules/lodash/object/keysIn.js new file mode 100644 index 0000000..45a85d7 --- /dev/null +++ b/node_modules/lodash/object/keysIn.js @@ -0,0 +1,64 @@ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('../internal/isIndex'), + isLength = require('../internal/isLength'), + isObject = require('../lang/isObject'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keysIn; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/mapKeys.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/mapKeys.js b/node_modules/lodash/object/mapKeys.js new file mode 100644 index 0000000..680b29b --- /dev/null +++ b/node_modules/lodash/object/mapKeys.js @@ -0,0 +1,25 @@ +var createObjectMapper = require('../internal/createObjectMapper'); + +/** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * property of `object` through `iteratee`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ +var mapKeys = createObjectMapper(true); + +module.exports = mapKeys; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/mapValues.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/mapValues.js b/node_modules/lodash/object/mapValues.js new file mode 100644 index 0000000..2afe6ba --- /dev/null +++ b/node_modules/lodash/object/mapValues.js @@ -0,0 +1,46 @@ +var createObjectMapper = require('../internal/createObjectMapper'); + +/** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through `iteratee`. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, key, object). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { + * return n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * // using the `_.property` callback shorthand + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +var mapValues = createObjectMapper(); + +module.exports = mapValues; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/merge.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/merge.js b/node_modules/lodash/object/merge.js new file mode 100644 index 0000000..86dd8af --- /dev/null +++ b/node_modules/lodash/object/merge.js @@ -0,0 +1,54 @@ +var baseMerge = require('../internal/baseMerge'), + createAssigner = require('../internal/createAssigner'); + +/** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it's invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ +var merge = createAssigner(baseMerge); + +module.exports = merge; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/methods.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/methods.js b/node_modules/lodash/object/methods.js new file mode 100644 index 0000000..8a304fe --- /dev/null +++ b/node_modules/lodash/object/methods.js @@ -0,0 +1 @@ +module.exports = require('./functions'); http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/omit.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/omit.js b/node_modules/lodash/object/omit.js new file mode 100644 index 0000000..fe3f485 --- /dev/null +++ b/node_modules/lodash/object/omit.js @@ -0,0 +1,47 @@ +var arrayMap = require('../internal/arrayMap'), + baseDifference = require('../internal/baseDifference'), + baseFlatten = require('../internal/baseFlatten'), + bindCallback = require('../internal/bindCallback'), + keysIn = require('./keysIn'), + pickByArray = require('../internal/pickByArray'), + pickByCallback = require('../internal/pickByCallback'), + restParam = require('../function/restParam'); + +/** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to omit, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.omit(object, 'age'); + * // => { 'user': 'fred' } + * + * _.omit(object, _.isNumber); + * // => { 'user': 'fred' } + */ +var omit = restParam(function(object, props) { + if (object == null) { + return {}; + } + if (typeof props[0] != 'function') { + var props = arrayMap(baseFlatten(props), String); + return pickByArray(object, baseDifference(keysIn(object), props)); + } + var predicate = bindCallback(props[0], props[1], 3); + return pickByCallback(object, function(value, key, object) { + return !predicate(value, key, object); + }); +}); + +module.exports = omit; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/pairs.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/pairs.js b/node_modules/lodash/object/pairs.js new file mode 100644 index 0000000..fd4644c --- /dev/null +++ b/node_modules/lodash/object/pairs.js @@ -0,0 +1,33 @@ +var keys = require('./keys'), + toObject = require('../internal/toObject'); + +/** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ +function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; +} + +module.exports = pairs; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/pick.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/pick.js b/node_modules/lodash/object/pick.js new file mode 100644 index 0000000..e318766 --- /dev/null +++ b/node_modules/lodash/object/pick.js @@ -0,0 +1,42 @@ +var baseFlatten = require('../internal/baseFlatten'), + bindCallback = require('../internal/bindCallback'), + pickByArray = require('../internal/pickByArray'), + pickByCallback = require('../internal/pickByCallback'), + restParam = require('../function/restParam'); + +/** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it's invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ +var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); +}); + +module.exports = pick; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/result.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/result.js b/node_modules/lodash/object/result.js new file mode 100644 index 0000000..29b38e6 --- /dev/null +++ b/node_modules/lodash/object/result.js @@ -0,0 +1,49 @@ +var baseGet = require('../internal/baseGet'), + baseSlice = require('../internal/baseSlice'), + isFunction = require('../lang/isFunction'), + isKey = require('../internal/isKey'), + last = require('../array/last'), + toPath = require('../internal/toPath'); + +/** + * This method is like `_.get` except that if the resolved value is a function + * it's invoked with the `this` binding of its parent object and its result + * is returned. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a.b.c', 'default'); + * // => 'default' + * + * _.result(object, 'a.b.c', _.constant('default')); + * // => 'default' + */ +function result(object, path, defaultValue) { + var result = object == null ? undefined : object[path]; + if (result === undefined) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + result = object == null ? undefined : object[last(path)]; + } + result = result === undefined ? defaultValue : result; + } + return isFunction(result) ? result.call(object) : result; +} + +module.exports = result; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/set.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/set.js b/node_modules/lodash/object/set.js new file mode 100644 index 0000000..7a1e4e9 --- /dev/null +++ b/node_modules/lodash/object/set.js @@ -0,0 +1,55 @@ +var isIndex = require('../internal/isIndex'), + isKey = require('../internal/isKey'), + isObject = require('../lang/isObject'), + toPath = require('../internal/toPath'); + +/** + * Sets the property value of `path` on `object`. If a portion of `path` + * does not exist it's created. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to augment. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, 'x[0].y.z', 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + if (object == null) { + return object; + } + var pathKey = (path + ''); + path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = path[index]; + if (isObject(nested)) { + if (index == lastIndex) { + nested[key] = value; + } else if (nested[key] == null) { + nested[key] = isIndex(path[index + 1]) ? [] : {}; + } + } + nested = nested[key]; + } + return object; +} + +module.exports = set; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/transform.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/transform.js b/node_modules/lodash/object/transform.js new file mode 100644 index 0000000..9a814b1 --- /dev/null +++ b/node_modules/lodash/object/transform.js @@ -0,0 +1,61 @@ +var arrayEach = require('../internal/arrayEach'), + baseCallback = require('../internal/baseCallback'), + baseCreate = require('../internal/baseCreate'), + baseForOwn = require('../internal/baseForOwn'), + isArray = require('../lang/isArray'), + isFunction = require('../lang/isFunction'), + isObject = require('../lang/isObject'), + isTypedArray = require('../lang/isTypedArray'); + +/** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own enumerable + * properties through `iteratee`, with each invocation potentially mutating + * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Array|Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + */ +function transform(object, iteratee, accumulator, thisArg) { + var isArr = isArray(object) || isTypedArray(object); + iteratee = baseCallback(iteratee, thisArg, 4); + + if (accumulator == null) { + if (isArr || isObject(object)) { + var Ctor = object.constructor; + if (isArr) { + accumulator = isArray(object) ? new Ctor : []; + } else { + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); + } + } else { + accumulator = {}; + } + } + (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; +} + +module.exports = transform; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/values.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/values.js b/node_modules/lodash/object/values.js new file mode 100644 index 0000000..0171515 --- /dev/null +++ b/node_modules/lodash/object/values.js @@ -0,0 +1,33 @@ +var baseValues = require('../internal/baseValues'), + keys = require('./keys'); + +/** + * Creates an array of the own enumerable property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return baseValues(object, keys(object)); +} + +module.exports = values; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/object/valuesIn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/object/valuesIn.js b/node_modules/lodash/object/valuesIn.js new file mode 100644 index 0000000..5f067c0 --- /dev/null +++ b/node_modules/lodash/object/valuesIn.js @@ -0,0 +1,31 @@ +var baseValues = require('../internal/baseValues'), + keysIn = require('./keysIn'); + +/** + * Creates an array of the own and inherited enumerable property values + * of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ +function valuesIn(object) { + return baseValues(object, keysIn(object)); +} + +module.exports = valuesIn; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/package.json ---------------------------------------------------------------------- diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json new file mode 100644 index 0000000..38e2638 --- /dev/null +++ b/node_modules/lodash/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + "lodash@^3.5.0", + "/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder" + ] + ], + "_from": "lodash@>=3.5.0 <4.0.0", + "_id": "lodash@3.10.1", + "_inCache": true, + "_installable": true, + "_location": "/lodash", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.13.1", + "_phantomChildren": {}, + "_requested": { + "name": "lodash", + "raw": "lodash@^3.5.0", + "rawSpec": "^3.5.0", + "scope": null, + "spec": ">=3.5.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/xmlbuilder" + ], + "_resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "_shasum": "5bf45e8e49ba4189e17d482789dfd15bd140b7b6", + "_shrinkwrap": null, + "_spec": "lodash@^3.5.0", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash modular utilities.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5bf45e8e49ba4189e17d482789dfd15bd140b7b6", + "tarball": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "modules", + "stdlib", + "util" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.10.1" +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string.js b/node_modules/lodash/string.js new file mode 100644 index 0000000..f777945 --- /dev/null +++ b/node_modules/lodash/string.js @@ -0,0 +1,25 @@ +module.exports = { + 'camelCase': require('./string/camelCase'), + 'capitalize': require('./string/capitalize'), + 'deburr': require('./string/deburr'), + 'endsWith': require('./string/endsWith'), + 'escape': require('./string/escape'), + 'escapeRegExp': require('./string/escapeRegExp'), + 'kebabCase': require('./string/kebabCase'), + 'pad': require('./string/pad'), + 'padLeft': require('./string/padLeft'), + 'padRight': require('./string/padRight'), + 'parseInt': require('./string/parseInt'), + 'repeat': require('./string/repeat'), + 'snakeCase': require('./string/snakeCase'), + 'startCase': require('./string/startCase'), + 'startsWith': require('./string/startsWith'), + 'template': require('./string/template'), + 'templateSettings': require('./string/templateSettings'), + 'trim': require('./string/trim'), + 'trimLeft': require('./string/trimLeft'), + 'trimRight': require('./string/trimRight'), + 'trunc': require('./string/trunc'), + 'unescape': require('./string/unescape'), + 'words': require('./string/words') +}; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/camelCase.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/camelCase.js b/node_modules/lodash/string/camelCase.js new file mode 100644 index 0000000..2d438f4 --- /dev/null +++ b/node_modules/lodash/string/camelCase.js @@ -0,0 +1,27 @@ +var createCompounder = require('../internal/createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar'); + * // => 'fooBar' + * + * _.camelCase('__foo_bar__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); +}); + +module.exports = camelCase; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/capitalize.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/capitalize.js b/node_modules/lodash/string/capitalize.js new file mode 100644 index 0000000..f9222dc --- /dev/null +++ b/node_modules/lodash/string/capitalize.js @@ -0,0 +1,21 @@ +var baseToString = require('../internal/baseToString'); + +/** + * Capitalizes the first character of `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('fred'); + * // => 'Fred' + */ +function capitalize(string) { + string = baseToString(string); + return string && (string.charAt(0).toUpperCase() + string.slice(1)); +} + +module.exports = capitalize; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/deburr.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/deburr.js b/node_modules/lodash/string/deburr.js new file mode 100644 index 0000000..0bd03e6 --- /dev/null +++ b/node_modules/lodash/string/deburr.js @@ -0,0 +1,29 @@ +var baseToString = require('../internal/baseToString'), + deburrLetter = require('../internal/deburrLetter'); + +/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ +var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; + +/** Used to match latin-1 supplementary letters (excluding mathematical operators). */ +var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + +/** + * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = baseToString(string); + return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/endsWith.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/endsWith.js b/node_modules/lodash/string/endsWith.js new file mode 100644 index 0000000..26821e2 --- /dev/null +++ b/node_modules/lodash/string/endsWith.js @@ -0,0 +1,40 @@ +var baseToString = require('../internal/baseToString'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search from. + * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = baseToString(string); + target = (target + ''); + + var length = string.length; + position = position === undefined + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; + return position >= 0 && string.indexOf(target, position) == position; +} + +module.exports = endsWith; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/escape.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/escape.js b/node_modules/lodash/string/escape.js new file mode 100644 index 0000000..cd08a5d --- /dev/null +++ b/node_modules/lodash/string/escape.js @@ -0,0 +1,48 @@ +var baseToString = require('../internal/baseToString'), + escapeHtmlChar = require('../internal/escapeHtmlChar'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"'`]/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to + * their corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional characters + * use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. + * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in Internet Explorer < 9, they can break out + * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), + * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and + * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) + * for more details. + * + * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) + * to reduce XSS vectors. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + // Reset `lastIndex` because in IE < 9 `String#replace` does not. + string = baseToString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/escapeRegExp.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/escapeRegExp.js b/node_modules/lodash/string/escapeRegExp.js new file mode 100644 index 0000000..176137a --- /dev/null +++ b/node_modules/lodash/string/escapeRegExp.js @@ -0,0 +1,32 @@ +var baseToString = require('../internal/baseToString'), + escapeRegExpChar = require('../internal/escapeRegExpChar'); + +/** + * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns) + * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern). + */ +var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, + reHasRegExpChars = RegExp(reRegExpChars.source); + +/** + * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", + * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' + */ +function escapeRegExp(string) { + string = baseToString(string); + return (string && reHasRegExpChars.test(string)) + ? string.replace(reRegExpChars, escapeRegExpChar) + : (string || '(?:)'); +} + +module.exports = escapeRegExp; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/kebabCase.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/kebabCase.js b/node_modules/lodash/string/kebabCase.js new file mode 100644 index 0000000..d29c2f9 --- /dev/null +++ b/node_modules/lodash/string/kebabCase.js @@ -0,0 +1,26 @@ +var createCompounder = require('../internal/createCompounder'); + +/** + * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__foo_bar__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/pad.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/pad.js b/node_modules/lodash/string/pad.js new file mode 100644 index 0000000..60e523b --- /dev/null +++ b/node_modules/lodash/string/pad.js @@ -0,0 +1,47 @@ +var baseToString = require('../internal/baseToString'), + createPadding = require('../internal/createPadding'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeIsFinite = global.isFinite; + +/** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ +function pad(string, length, chars) { + string = baseToString(string); + length = +length; + + var strLength = string.length; + if (strLength >= length || !nativeIsFinite(length)) { + return string; + } + var mid = (length - strLength) / 2, + leftLength = nativeFloor(mid), + rightLength = nativeCeil(mid); + + chars = createPadding('', rightLength, chars); + return chars.slice(0, leftLength) + string + chars; +} + +module.exports = pad; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/padLeft.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/padLeft.js b/node_modules/lodash/string/padLeft.js new file mode 100644 index 0000000..bb0c94d --- /dev/null +++ b/node_modules/lodash/string/padLeft.js @@ -0,0 +1,27 @@ +var createPadDir = require('../internal/createPadDir'); + +/** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padLeft('abc', 6); + * // => ' abc' + * + * _.padLeft('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padLeft('abc', 3); + * // => 'abc' + */ +var padLeft = createPadDir(); + +module.exports = padLeft; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/padRight.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/padRight.js b/node_modules/lodash/string/padRight.js new file mode 100644 index 0000000..dc12f55 --- /dev/null +++ b/node_modules/lodash/string/padRight.js @@ -0,0 +1,27 @@ +var createPadDir = require('../internal/createPadDir'); + +/** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padRight('abc', 6); + * // => 'abc ' + * + * _.padRight('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padRight('abc', 3); + * // => 'abc' + */ +var padRight = createPadDir(true); + +module.exports = padRight; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/parseInt.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/parseInt.js b/node_modules/lodash/string/parseInt.js new file mode 100644 index 0000000..f457711 --- /dev/null +++ b/node_modules/lodash/string/parseInt.js @@ -0,0 +1,46 @@ +var isIterateeCall = require('../internal/isIterateeCall'), + trim = require('./trim'); + +/** Used to detect hexadecimal string values. */ +var reHasHexPrefix = /^0[xX]/; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeParseInt = global.parseInt; + +/** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, + * in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) + * of `parseInt`. + * + * @static + * @memberOf _ + * @category String + * @param {string} string The string to convert. + * @param {number} [radix] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ +function parseInt(string, radix, guard) { + // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. + // Chrome fails to trim leading whitespace characters. + // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. + if (guard ? isIterateeCall(string, radix, guard) : radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + string = trim(string); + return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); +} + +module.exports = parseInt; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/repeat.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/repeat.js b/node_modules/lodash/string/repeat.js new file mode 100644 index 0000000..2902123 --- /dev/null +++ b/node_modules/lodash/string/repeat.js @@ -0,0 +1,47 @@ +var baseToString = require('../internal/baseToString'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeIsFinite = global.isFinite; + +/** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ +function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; +} + +module.exports = repeat; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/snakeCase.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/snakeCase.js b/node_modules/lodash/string/snakeCase.js new file mode 100644 index 0000000..c9ebffd --- /dev/null +++ b/node_modules/lodash/string/snakeCase.js @@ -0,0 +1,26 @@ +var createCompounder = require('../internal/createCompounder'); + +/** + * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--foo-bar'); + * // => 'foo_bar' + */ +var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); +}); + +module.exports = snakeCase; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/startCase.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/startCase.js b/node_modules/lodash/string/startCase.js new file mode 100644 index 0000000..740d48a --- /dev/null +++ b/node_modules/lodash/string/startCase.js @@ -0,0 +1,26 @@ +var createCompounder = require('../internal/createCompounder'); + +/** + * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__foo_bar__'); + * // => 'Foo Bar' + */ +var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); +}); + +module.exports = startCase; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1d7ccaec/node_modules/lodash/string/startsWith.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash/string/startsWith.js b/node_modules/lodash/string/startsWith.js new file mode 100644 index 0000000..65fae2a --- /dev/null +++ b/node_modules/lodash/string/startsWith.js @@ -0,0 +1,36 @@ +var baseToString = require('../internal/baseToString'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ +function startsWith(string, target, position) { + string = baseToString(string); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + + return string.lastIndexOf(target, position) == position; +} + +module.exports = startsWith; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org