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 1B03518D9D for ; Wed, 24 Feb 2016 23:56:05 +0000 (UTC) Received: (qmail 17802 invoked by uid 500); 24 Feb 2016 23:56:02 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 17746 invoked by uid 500); 24 Feb 2016 23:56:02 -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 17435 invoked by uid 99); 24 Feb 2016 23:56:02 -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; Wed, 24 Feb 2016 23:56:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 07F10E8ECD; Wed, 24 Feb 2016 23:56:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Wed, 24 Feb 2016 23:56:38 -0000 Message-Id: <44a7291b60c44f3eb294ed7b99a75f8c@git.apache.org> In-Reply-To: <7637bde6ac8a44ca804c41dd403269bd@git.apache.org> References: <7637bde6ac8a44ca804c41dd403269bd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [39/51] [abbrv] [partial] ios commit: CB-10668 checked in node_modules http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isBoolean.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isBoolean.js b/node_modules/lodash-node/compat/objects/isBoolean.js new file mode 100644 index 0000000..aa97cc4 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isBoolean.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var boolClass = '[object Boolean]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + value && typeof value == 'object' && toString.call(value) == boolClass || false; +} + +module.exports = isBoolean; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isDate.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isDate.js b/node_modules/lodash-node/compat/objects/isDate.js new file mode 100644 index 0000000..9084a4c --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isDate.js @@ -0,0 +1,36 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var dateClass = '[object Date]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ +function isDate(value) { + return value && typeof value == 'object' && toString.call(value) == dateClass || false; +} + +module.exports = isDate; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isElement.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isElement.js b/node_modules/lodash-node/compat/objects/isElement.js new file mode 100644 index 0000000..9538278 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isElement.js @@ -0,0 +1,27 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ +function isElement(value) { + return value && value.nodeType === 1 || false; +} + +module.exports = isElement; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isEmpty.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isEmpty.js b/node_modules/lodash-node/compat/objects/isEmpty.js new file mode 100644 index 0000000..c9899e3 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isEmpty.js @@ -0,0 +1,66 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forOwn = require('./forOwn'), + isArguments = require('./isArguments'), + isFunction = require('./isFunction'), + support = require('../support'); + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + objectClass = '[object Object]', + stringClass = '[object String]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ +function isEmpty(value) { + var result = true; + if (!value) { + return result; + } + var className = toString.call(value), + length = value.length; + + if ((className == arrayClass || className == stringClass || + (support.argsClass ? className == argsClass : isArguments(value))) || + (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { + return !length; + } + forOwn(value, function() { + return (result = false); + }); + return result; +} + +module.exports = isEmpty; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isEqual.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isEqual.js b/node_modules/lodash-node/compat/objects/isEqual.js new file mode 100644 index 0000000..fbb4960 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isEqual.js @@ -0,0 +1,54 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + baseIsEqual = require('../internals/baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ +function isEqual(a, b, callback, thisArg) { + return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2)); +} + +module.exports = isEqual; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isFinite.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isFinite.js b/node_modules/lodash-node/compat/objects/isFinite.js new file mode 100644 index 0000000..8546112 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isFinite.js @@ -0,0 +1,46 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeIsFinite = global.isFinite, + nativeIsNaN = global.isNaN; + +/** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ +function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); +} + +module.exports = isFinite; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isFunction.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isFunction.js b/node_modules/lodash-node/compat/objects/isFunction.js new file mode 100644 index 0000000..22608cd --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isFunction.js @@ -0,0 +1,42 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var funcClass = '[object Function]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ +function isFunction(value) { + return typeof value == 'function'; +} +// fallback for older versions of Chrome and Safari +if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value == 'function' && toString.call(value) == funcClass; + }; +} + +module.exports = isFunction; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isNaN.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isNaN.js b/node_modules/lodash-node/compat/objects/isNaN.js new file mode 100644 index 0000000..426652d --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isNaN.js @@ -0,0 +1,42 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; +} + +module.exports = isNaN; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isNull.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isNull.js b/node_modules/lodash-node/compat/objects/isNull.js new file mode 100644 index 0000000..4789d5d --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isNull.js @@ -0,0 +1,30 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isNumber.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isNumber.js b/node_modules/lodash-node/compat/objects/isNumber.js new file mode 100644 index 0000000..f242787 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isNumber.js @@ -0,0 +1,39 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var numberClass = '[object Number]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ +function isNumber(value) { + return typeof value == 'number' || + value && typeof value == 'object' && toString.call(value) == numberClass || false; +} + +module.exports = isNumber; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isObject.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isObject.js b/node_modules/lodash-node/compat/objects/isObject.js new file mode 100644 index 0000000..a156308 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isObject.js @@ -0,0 +1,39 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var objectTypes = require('../internals/objectTypes'); + +/** + * Checks if `value` is the language type of Object. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // check if the value is the ECMAScript language type of Object + // http://es5.github.io/#x8 + // and avoid a V8 bug + // http://code.google.com/p/v8/issues/detail?id=2291 + return !!(value && objectTypes[typeof value]); +} + +module.exports = isObject; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isPlainObject.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isPlainObject.js b/node_modules/lodash-node/compat/objects/isPlainObject.js new file mode 100644 index 0000000..9f2fe81 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isPlainObject.js @@ -0,0 +1,62 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isArguments = require('./isArguments'), + isNative = require('../internals/isNative'), + shimIsPlainObject = require('../internals/shimIsPlainObject'), + support = require('../support'); + +/** `Object#toString` result shortcuts */ +var objectClass = '[object Object]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Native method shortcuts */ +var getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf; + +/** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ +var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { + if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { + return false; + } + var valueOf = value.valueOf, + objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); + + return objProto + ? (value == objProto || getPrototypeOf(value) == objProto) + : shimIsPlainObject(value); +}; + +module.exports = isPlainObject; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isRegExp.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isRegExp.js b/node_modules/lodash-node/compat/objects/isRegExp.js new file mode 100644 index 0000000..d7800d0 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isRegExp.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var objectTypes = require('../internals/objectTypes'); + +/** `Object#toString` result shortcuts */ +var regexpClass = '[object RegExp]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ +function isRegExp(value) { + return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false; +} + +module.exports = isRegExp; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isString.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isString.js b/node_modules/lodash-node/compat/objects/isString.js new file mode 100644 index 0000000..e1fabd5 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isString.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result shortcuts */ +var stringClass = '[object String]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ +function isString(value) { + return typeof value == 'string' || + value && typeof value == 'object' && toString.call(value) == stringClass || false; +} + +module.exports = isString; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/isUndefined.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/isUndefined.js b/node_modules/lodash-node/compat/objects/isUndefined.js new file mode 100644 index 0000000..1e28a1f --- /dev/null +++ b/node_modules/lodash-node/compat/objects/isUndefined.js @@ -0,0 +1,27 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ +function isUndefined(value) { + return typeof value == 'undefined'; +} + +module.exports = isUndefined; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/keys.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/keys.js b/node_modules/lodash-node/compat/objects/keys.js new file mode 100644 index 0000000..9959b2b --- /dev/null +++ b/node_modules/lodash-node/compat/objects/keys.js @@ -0,0 +1,42 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isArguments = require('./isArguments'), + isNative = require('../internals/isNative'), + isObject = require('./isObject'), + shimKeys = require('../internals/shimKeys'), + support = require('../support'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; + +/** + * Creates an array composed of the own enumerable property names of an object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names. + * @example + * + * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); + * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) + */ +var keys = !nativeKeys ? shimKeys : function(object) { + if (!isObject(object)) { + return []; + } + if ((support.enumPrototypes && typeof object == 'function') || + (support.nonEnumArgs && object.length && isArguments(object))) { + return shimKeys(object); + } + return nativeKeys(object); +}; + +module.exports = keys; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/mapValues.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/mapValues.js b/node_modules/lodash-node/compat/objects/mapValues.js new file mode 100644 index 0000000..431f55b --- /dev/null +++ b/node_modules/lodash-node/compat/objects/mapValues.js @@ -0,0 +1,58 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var createCallback = require('../functions/createCallback'), + forOwn = require('./forOwn'); + +/** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ +function mapValues(object, callback, thisArg) { + var result = {}; + callback = createCallback(callback, thisArg, 3); + + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; +} + +module.exports = mapValues; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/merge.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/merge.js b/node_modules/lodash-node/compat/objects/merge.js new file mode 100644 index 0000000..cb602a2 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/merge.js @@ -0,0 +1,97 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + baseMerge = require('../internals/baseMerge'), + getArray = require('../internals/getArray'), + isObject = require('./isObject'), + releaseArray = require('../internals/releaseArray'), + slice = require('../internals/slice'); + +/** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ +function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } + // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + if (typeof args[2] != 'number') { + length = args.length; + } + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback(args[--length - 1], args[length--], 2); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + releaseArray(stackA); + releaseArray(stackB); + return object; +} + +module.exports = merge; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/omit.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/omit.js b/node_modules/lodash-node/compat/objects/omit.js new file mode 100644 index 0000000..6517419 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/omit.js @@ -0,0 +1,67 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseDifference = require('../internals/baseDifference'), + baseFlatten = require('../internals/baseFlatten'), + createCallback = require('../functions/createCallback'), + forIn = require('./forIn'); + +/** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ +function omit(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; +} + +module.exports = omit; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/pairs.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/pairs.js b/node_modules/lodash-node/compat/objects/pairs.js new file mode 100644 index 0000000..b334c4a --- /dev/null +++ b/node_modules/lodash-node/compat/objects/pairs.js @@ -0,0 +1,38 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('./keys'); + +/** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ +function pairs(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-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/pick.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/pick.js b/node_modules/lodash-node/compat/objects/pick.js new file mode 100644 index 0000000..fb581ad --- /dev/null +++ b/node_modules/lodash-node/compat/objects/pick.js @@ -0,0 +1,65 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFlatten = require('../internals/baseFlatten'), + createCallback = require('../functions/createCallback'), + forIn = require('./forIn'), + isObject = require('./isObject'); + +/** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ +function pick(object, callback, thisArg) { + var result = {}; + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + return result; +} + +module.exports = pick; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/transform.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/transform.js b/node_modules/lodash-node/compat/objects/transform.js new file mode 100644 index 0000000..f04b078 --- /dev/null +++ b/node_modules/lodash-node/compat/objects/transform.js @@ -0,0 +1,67 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCreate = require('../internals/baseCreate'), + baseEach = require('../internals/baseEach'), + createCallback = require('../functions/createCallback'), + forOwn = require('./forOwn'), + isArray = require('./isArray'); + +/** + * 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 a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ +function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + + accumulator = baseCreate(proto); + } + } + if (callback) { + callback = createCallback(callback, thisArg, 4); + (isArr ? baseEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + return accumulator; +} + +module.exports = transform; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/objects/values.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/objects/values.js b/node_modules/lodash-node/compat/objects/values.js new file mode 100644 index 0000000..e3135ae --- /dev/null +++ b/node_modules/lodash-node/compat/objects/values.js @@ -0,0 +1,36 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var keys = require('./keys'); + +/** + * Creates an array composed of the own enumerable property values of `object`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property values. + * @example + * + * _.values({ 'one': 1, 'two': 2, 'three': 3 }); + * // => [1, 2, 3] (property order is not guaranteed across environments) + */ +function values(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; +} + +module.exports = values; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/support.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/support.js b/node_modules/lodash-node/compat/support.js new file mode 100644 index 0000000..fb6ec48 --- /dev/null +++ b/node_modules/lodash-node/compat/support.js @@ -0,0 +1,177 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('./internals/isNative'); + +/** Used to detect functions containing a `this` reference */ +var reThis = /\bthis\b/; + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]', + objectClass = '[object Object]'; + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Used for native method references */ +var errorProto = Error.prototype, + objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Native method shortcuts */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ +var support = {}; + +(function() { + var ctor = function() { this.x = 1; }, + object = { '0': 1, 'length': 1 }, + props = []; + + ctor.prototype = { 'valueOf': 1, 'y': 1 }; + for (var key in new ctor) { props.push(key); } + for (key in arguments) { } + + /** + * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.argsClass = toString.call(arguments) == argsClass; + + /** + * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5). + * + * @memberOf _.support + * @type boolean + */ + support.argsObject = arguments.constructor == Object && !(arguments instanceof Array); + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default. (IE < 9, Safari < 5.1) + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly sets a function's `prototype` property [[Enumerable]] + * value to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); + + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; }); + + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + support.funcNames = typeof Function.name == 'string'; + + /** + * Detect if `arguments` object indexes are non-enumerable + * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumArgs = key != 0; + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are + * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` + * and `splice()` functions that fail to remove the last element, `value[0]`, + * of array-like objects even though the `length` property is set to `0`. + * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` + * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access + * characters by index on string literals. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + + /** + * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) + * and that the JS engine errors when attempting to coerce an object to + * a string without a `toString` function. + * + * @memberOf _.support + * @type boolean + */ + try { + support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); + } catch(e) { + support.nodeClass = true; + } +}(1)); + +module.exports = support; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities.js b/node_modules/lodash-node/compat/utilities.js new file mode 100644 index 0000000..0fc2d98 --- /dev/null +++ b/node_modules/lodash-node/compat/utilities.js @@ -0,0 +1,28 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +module.exports = { + 'constant': require('./utilities/constant'), + 'createCallback': require('./functions/createCallback'), + 'escape': require('./utilities/escape'), + 'identity': require('./utilities/identity'), + 'mixin': require('./utilities/mixin'), + 'noConflict': require('./utilities/noConflict'), + 'noop': require('./utilities/noop'), + 'now': require('./utilities/now'), + 'parseInt': require('./utilities/parseInt'), + 'property': require('./utilities/property'), + 'random': require('./utilities/random'), + 'result': require('./utilities/result'), + 'template': require('./utilities/template'), + 'templateSettings': require('./utilities/templateSettings'), + 'times': require('./utilities/times'), + 'unescape': require('./utilities/unescape'), + 'uniqueId': require('./utilities/uniqueId') +}; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/constant.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/constant.js b/node_modules/lodash-node/compat/utilities/constant.js new file mode 100644 index 0000000..ae112ed --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/constant.js @@ -0,0 +1,31 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/escape.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/escape.js b/node_modules/lodash-node/compat/utilities/escape.js new file mode 100644 index 0000000..00582b9 --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/escape.js @@ -0,0 +1,31 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var escapeHtmlChar = require('../internals/escapeHtmlChar'), + keys = require('../objects/keys'), + reUnescapedHtml = require('../internals/reUnescapedHtml'); + +/** + * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their + * corresponding HTML entities. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('Fred, Wilma, & Pebbles'); + * // => 'Fred, Wilma, & Pebbles' + */ +function escape(string) { + return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); +} + +module.exports = escape; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/identity.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/identity.js b/node_modules/lodash-node/compat/utilities/identity.js new file mode 100644 index 0000000..838700c --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/identity.js @@ -0,0 +1,28 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/mixin.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/mixin.js b/node_modules/lodash-node/compat/utilities/mixin.js new file mode 100644 index 0000000..26db74f --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/mixin.js @@ -0,0 +1,88 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var forEach = require('../collections/forEach'), + functions = require('../objects/functions'), + isFunction = require('../objects/isFunction'), + isObject = require('../objects/isObject'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var push = arrayRef.push; + +/** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ +function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + var ctor = object, + isFunc = isFunction(ctor); + + forEach(methodNames, function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + + push.apply(args, arguments); + var result = func.apply(object, args); + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + result = new ctor(result); + result.__chain__ = chainAll; + } + return result; + }; + } + }); +} + +module.exports = mixin; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/noConflict.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/noConflict.js b/node_modules/lodash-node/compat/utilities/noConflict.js new file mode 100644 index 0000000..eb78149 --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/noConflict.js @@ -0,0 +1,30 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to restore the original `_` reference in `noConflict` */ +var oldDash = global._; + +/** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ +function noConflict() { + global._ = oldDash; + return this; +} + +module.exports = noConflict; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/noop.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/noop.js b/node_modules/lodash-node/compat/utilities/noop.js new file mode 100644 index 0000000..3cd2d53 --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/noop.js @@ -0,0 +1,26 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ +function noop() { + // no operation performed +} + +module.exports = noop; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/now.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/now.js b/node_modules/lodash-node/compat/utilities/now.js new file mode 100644 index 0000000..ee091dc --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/now.js @@ -0,0 +1,28 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isNative = require('../internals/isNative'); + +/** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ +var now = isNative(now = Date.now) && now || function() { + return new Date().getTime(); +}; + +module.exports = now; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/parseInt.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/parseInt.js b/node_modules/lodash-node/compat/utilities/parseInt.js new file mode 100644 index 0000000..6227ccd --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/parseInt.js @@ -0,0 +1,53 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isString = require('../objects/isString'); + +/** Used to detect and test whitespace */ +var whitespace = ( + // whitespace + ' \t\x0B\f\xA0\ufeff' + + + // line terminators + '\n\r\u2028\u2029' + + + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' +); + +/** Used to match leading whitespace and zeros to be removed */ +var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeParseInt = global.parseInt; + +/** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ +var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt(isString(value) ? value.replace(reLeadingSpacesAndZeros, '') : value, radix || 0); +}; + +module.exports = parseInt; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/property.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/property.js b/node_modules/lodash-node/compat/utilities/property.js new file mode 100644 index 0000000..f3446dd --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/property.js @@ -0,0 +1,40 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ +function property(key) { + return function(object) { + return object[key]; + }; +} + +module.exports = property; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/random.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/random.js b/node_modules/lodash-node/compat/utilities/random.js new file mode 100644 index 0000000..286bd1e --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/random.js @@ -0,0 +1,73 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseRandom = require('../internals/baseRandom'); + +/* Native method shortcuts for methods 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 will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a 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) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } + else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + } + 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-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/result.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/result.js b/node_modules/lodash-node/compat/utilities/result.js new file mode 100644 index 0000000..306b563 --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/result.js @@ -0,0 +1,45 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isFunction = require('../objects/isFunction'); + +/** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ +function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } +} + +module.exports = result; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7f059c0/node_modules/lodash-node/compat/utilities/template.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/compat/utilities/template.js b/node_modules/lodash-node/compat/utilities/template.js new file mode 100644 index 0000000..b4906b3 --- /dev/null +++ b/node_modules/lodash-node/compat/utilities/template.js @@ -0,0 +1,216 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) + * Build: `lodash modularize exports="node" -o ./compat/` + * Copyright 2012-2013 The Dojo Foundation + * Based on Underscore.js 1.5.2 + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var defaults = require('../objects/defaults'), + escape = require('./escape'), + escapeStringChar = require('../internals/escapeStringChar'), + keys = require('../objects/keys'), + reInterpolate = require('../internals/reInterpolate'), + templateSettings = require('./templateSettings'), + values = require('../objects/values'); + +/** Used to match empty string literals in compiled template source */ +var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + +/** + * Used to match ES6 template delimiters + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals + */ +var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + +/** Used to ensure capturing order of template delimiters */ +var reNoMatch = /($^)/; + +/** Used to match unescaped characters in compiled string literals */ +var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + +/** + * A micro-templating method that handles arbitrary delimiters, preserves + * whitespace, and correctly escapes quotes within interpolated code. + * + * Note: In the development build, `_.template` utilizes sourceURLs for easier + * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl + * + * For more information on precompiling templates see: + * http://lodash.com/custom-builds + * + * For more information on Chrome extension sandboxes see: + * http://developer.chrome.com/stable/extensions/sandboxingEval.html + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} text The template text. + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object + * is given, else it returns the interpolated text. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= name %>'); + * compiled({ 'name': 'fred' }); + * // => 'hello fred' + * + * // using the "escape" delimiter to escape HTML in data property values + * _.template('<%- value %>', { 'value': '