http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/escapeStringChar.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/escapeStringChar.js b/node_modules/lodash-node/underscore/internals/escapeStringChar.js new file mode 100644 index 0000000..bd88060 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/escapeStringChar.js @@ -0,0 +1,33 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used to escape characters for inclusion in compiled string literals */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `template` to escape characters for inclusion in compiled + * string literals. + * + * @private + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(match) { + return '\\' + stringEscapes[match]; +} + +module.exports = escapeStringChar;
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/htmlEscapes.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/htmlEscapes.js b/node_modules/lodash-node/underscore/internals/htmlEscapes.js new file mode 100644 index 0000000..d221a5c --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/htmlEscapes.js @@ -0,0 +1,26 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** + * Used to convert characters to HTML entities: + * + * Though the `>` character is escaped for symmetry, characters like `>` and `/` + * don't require escaping in HTML and have no special meaning unless they're part + * of a tag or an unquoted attribute value. + * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") + */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +module.exports = htmlEscapes; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/htmlUnescapes.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/htmlUnescapes.js b/node_modules/lodash-node/underscore/internals/htmlUnescapes.js new file mode 100644 index 0000000..0f818c1 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/htmlUnescapes.js @@ -0,0 +1,15 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var htmlEscapes = require('./htmlEscapes'), + invert = require('../objects/invert'); + +/** Used to convert HTML entities to characters */ +var htmlUnescapes = invert(htmlEscapes); + +module.exports = htmlUnescapes; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/indicatorObject.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/indicatorObject.js b/node_modules/lodash-node/underscore/internals/indicatorObject.js new file mode 100644 index 0000000..684ec9b --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/indicatorObject.js @@ -0,0 +1,13 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used internally to indicate various things */ +var indicatorObject = {}; + +module.exports = indicatorObject; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/isNative.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/isNative.js b/node_modules/lodash-node/underscore/internals/isNative.js new file mode 100644 index 0000000..5c1457e --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/isNative.js @@ -0,0 +1,34 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/** Used to detect if a method is native */ +var reNative = RegExp('^' + + String(toString) + .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + .replace(/toString| for [^\]]+/g, '.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. + */ +function isNative(value) { + return typeof value == 'function' && reNative.test(value); +} + +module.exports = isNative; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/keyPrefix.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/keyPrefix.js b/node_modules/lodash-node/underscore/internals/keyPrefix.js new file mode 100644 index 0000000..d4b4945 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/keyPrefix.js @@ -0,0 +1,13 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ +var keyPrefix = +new Date + ''; + +module.exports = keyPrefix; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/lodashWrapper.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/lodashWrapper.js b/node_modules/lodash-node/underscore/internals/lodashWrapper.js new file mode 100644 index 0000000..e8d38b5 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/lodashWrapper.js @@ -0,0 +1,23 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ +function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; +} + +module.exports = lodashWrapper; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/objectTypes.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/objectTypes.js b/node_modules/lodash-node/underscore/internals/objectTypes.js new file mode 100644 index 0000000..0ff2c28 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/objectTypes.js @@ -0,0 +1,20 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used to determine if values are of the language type Object */ +var objectTypes = { + 'boolean': false, + 'function': true, + 'object': true, + 'number': false, + 'string': false, + 'undefined': false +}; + +module.exports = objectTypes; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/reEscapedHtml.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/reEscapedHtml.js b/node_modules/lodash-node/underscore/internals/reEscapedHtml.js new file mode 100644 index 0000000..07fe67c --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/reEscapedHtml.js @@ -0,0 +1,15 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var htmlUnescapes = require('./htmlUnescapes'), + keys = require('../objects/keys'); + +/** Used to match HTML entities and HTML characters */ +var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'); + +module.exports = reEscapedHtml; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/reInterpolate.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/reInterpolate.js b/node_modules/lodash-node/underscore/internals/reInterpolate.js new file mode 100644 index 0000000..07af4c8 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/reInterpolate.js @@ -0,0 +1,13 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used to match "interpolate" template delimiters */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/reUnescapedHtml.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/reUnescapedHtml.js b/node_modules/lodash-node/underscore/internals/reUnescapedHtml.js new file mode 100644 index 0000000..f9cdf92 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/reUnescapedHtml.js @@ -0,0 +1,15 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var htmlEscapes = require('./htmlEscapes'), + keys = require('../objects/keys'); + +/** Used to match HTML entities and HTML characters */ +var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + +module.exports = reUnescapedHtml; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/shimKeys.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/shimKeys.js b/node_modules/lodash-node/underscore/internals/shimKeys.js new file mode 100644 index 0000000..6471285 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/shimKeys.js @@ -0,0 +1,38 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var objectTypes = require('./objectTypes'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which produces an array of the + * given object's own enumerable property names. + * + * @private + * @type Function + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names. + */ +var shimKeys = function(object) { + var index, iterable = object, result = []; + if (!iterable) return result; + if (!(objectTypes[typeof object])) return result; + for (index in iterable) { + if (hasOwnProperty.call(iterable, index)) { + result.push(index); + } + } + return result +}; + +module.exports = shimKeys; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/slice.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/slice.js b/node_modules/lodash-node/underscore/internals/slice.js new file mode 100644 index 0000000..7c19750 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/slice.js @@ -0,0 +1,38 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ +function slice(array, start, end) { + start || (start = 0); + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + return result; +} + +module.exports = slice; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/internals/unescapeHtmlChar.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/internals/unescapeHtmlChar.js b/node_modules/lodash-node/underscore/internals/unescapeHtmlChar.js new file mode 100644 index 0000000..080bb93 --- /dev/null +++ b/node_modules/lodash-node/underscore/internals/unescapeHtmlChar.js @@ -0,0 +1,22 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var htmlUnescapes = require('./htmlUnescapes'); + +/** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +function unescapeHtmlChar(match) { + return htmlUnescapes[match]; +} + +module.exports = unescapeHtmlChar; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects.js b/node_modules/lodash-node/underscore/objects.js new file mode 100644 index 0000000..1f45ee6 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects.js @@ -0,0 +1,42 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +module.exports = { + 'assign': require('./objects/assign'), + 'clone': require('./objects/clone'), + 'defaults': require('./objects/defaults'), + 'extend': require('./objects/assign'), + 'forIn': require('./objects/forIn'), + 'forOwn': require('./objects/forOwn'), + 'functions': require('./objects/functions'), + 'has': require('./objects/has'), + 'invert': require('./objects/invert'), + 'isArguments': require('./objects/isArguments'), + 'isArray': require('./objects/isArray'), + 'isBoolean': require('./objects/isBoolean'), + 'isDate': require('./objects/isDate'), + 'isElement': require('./objects/isElement'), + 'isEmpty': require('./objects/isEmpty'), + 'isEqual': require('./objects/isEqual'), + 'isFinite': require('./objects/isFinite'), + 'isFunction': require('./objects/isFunction'), + 'isNaN': require('./objects/isNaN'), + 'isNull': require('./objects/isNull'), + 'isNumber': require('./objects/isNumber'), + 'isObject': require('./objects/isObject'), + 'isRegExp': require('./objects/isRegExp'), + 'isString': require('./objects/isString'), + 'isUndefined': require('./objects/isUndefined'), + 'keys': require('./objects/keys'), + 'methods': require('./objects/functions'), + 'omit': require('./objects/omit'), + 'pairs': require('./objects/pairs'), + 'pick': require('./objects/pick'), + 'values': require('./objects/values') +}; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/assign.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/assign.js b/node_modules/lodash-node/underscore/objects/assign.js new file mode 100644 index 0000000..cf2ce8a --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/assign.js @@ -0,0 +1,58 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + keys = require('./keys'), + objectTypes = require('../internals/objectTypes'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ +function assign(object) { + if (!object) { + return object; + } + for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { + var iterable = arguments[argsIndex]; + if (iterable) { + for (var key in iterable) { + object[key] = iterable[key]; + } + } + } + return object; +} + +module.exports = assign; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/clone.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/clone.js b/node_modules/lodash-node/underscore/objects/clone.js new file mode 100644 index 0000000..f5735b2 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/clone.js @@ -0,0 +1,61 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var assign = require('./assign'), + baseCreateCallback = require('../internals/baseCreateCallback'), + isArray = require('./isArray'), + isObject = require('./isObject'), + slice = require('../internals/slice'); + +/** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ +function clone(value) { + return isObject(value) + ? (isArray(value) ? slice(value) : assign({}, value)) + : value; +} + +module.exports = clone; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/defaults.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/defaults.js b/node_modules/lodash-node/underscore/objects/defaults.js new file mode 100644 index 0000000..a27605d --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/defaults.js @@ -0,0 +1,49 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var keys = require('./keys'), + objectTypes = require('../internals/objectTypes'); + +/** + * 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 defaults of the same property will be ignored. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param- {Object} [guard] Allows working with `_.reduce` without using its + * `key` and `object` arguments as sources. + * @returns {Object} Returns the destination object. + * @example + * + * var object = { 'name': 'barney' }; + * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ +function defaults(object) { + if (!object) { + return object; + } + for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { + var iterable = arguments[argsIndex]; + if (iterable) { + for (var key in iterable) { + if (typeof object[key] == 'undefined') { + object[key] = iterable[key]; + } + } + } + } + return object; +} + +module.exports = defaults; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/forIn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/forIn.js b/node_modules/lodash-node/underscore/objects/forIn.js new file mode 100644 index 0000000..e8d29f9 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/forIn.js @@ -0,0 +1,54 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + indicatorObject = require('../internals/indicatorObject'), + objectTypes = require('../internals/objectTypes'); + +/** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ +var forIn = function(collection, callback) { + var index, iterable = collection, result = iterable; + if (!iterable) return result; + if (!objectTypes[typeof iterable]) return result; + for (index in iterable) { + if (callback(iterable[index], index, collection) === indicatorObject) return result; + } + return result +}; + +module.exports = forIn; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/forOwn.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/forOwn.js b/node_modules/lodash-node/underscore/objects/forOwn.js new file mode 100644 index 0000000..b91a110 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/forOwn.js @@ -0,0 +1,53 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var baseCreateCallback = require('../internals/baseCreateCallback'), + indicatorObject = require('../internals/indicatorObject'), + keys = require('./keys'), + objectTypes = require('../internals/objectTypes'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ +var forOwn = function(collection, callback) { + var index, iterable = collection, result = iterable; + if (!iterable) return result; + if (!objectTypes[typeof iterable]) return result; + for (index in iterable) { + if (hasOwnProperty.call(iterable, index)) { + if (callback(iterable[index], index, collection) === indicatorObject) return result; + } + } + return result +}; + +module.exports = forOwn; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/functions.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/functions.js b/node_modules/lodash-node/underscore/objects/functions.js new file mode 100644 index 0000000..2ac5794 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/functions.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var forIn = require('./forIn'), + isFunction = require('./isFunction'); + +/** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ +function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); +} + +module.exports = functions; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/has.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/has.js b/node_modules/lodash-node/underscore/objects/has.js new file mode 100644 index 0000000..838a4d6 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/has.js @@ -0,0 +1,35 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ +function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; +} + +module.exports = has; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/invert.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/invert.js b/node_modules/lodash-node/underscore/objects/invert.js new file mode 100644 index 0000000..a9716ca --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/invert.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var keys = require('./keys'); + +/** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ +function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + return result; +} + +module.exports = invert; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isArguments.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isArguments.js b/node_modules/lodash-node/underscore/objects/isArguments.js new file mode 100644 index 0000000..74736fe --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isArguments.js @@ -0,0 +1,51 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +/** `Object#toString` result shortcuts */ +var argsClass = '[object Arguments]'; + +/** 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 hasOwnProperty = objectProto.hasOwnProperty, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == argsClass || false; +} +// fallback for browsers that can't detect `arguments` objects by [[Class]] +if (!isArguments(arguments)) { + isArguments = function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false; + }; +} + +module.exports = isArguments; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isArray.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isArray.js b/node_modules/lodash-node/underscore/objects/isArray.js new file mode 100644 index 0000000..7ef5cd1 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isArray.js @@ -0,0 +1,45 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var isNative = require('../internals/isNative'); + +/** `Object#toString` result shortcuts */ +var arrayClass = '[object Array]'; + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Used to resolve the internal [[Class]] of values */ +var toString = objectProto.toString; + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray; + +/** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ +var isArray = nativeIsArray || function(value) { + return value && typeof value == 'object' && typeof value.length == 'number' && + toString.call(value) == arrayClass || false; +}; + +module.exports = isArray; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isBoolean.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isBoolean.js b/node_modules/lodash-node/underscore/objects/isBoolean.js new file mode 100644 index 0000000..ac09e8f --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isBoolean.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isDate.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isDate.js b/node_modules/lodash-node/underscore/objects/isDate.js new file mode 100644 index 0000000..2c9416a --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isDate.js @@ -0,0 +1,36 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isElement.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isElement.js b/node_modules/lodash-node/underscore/objects/isElement.js new file mode 100644 index 0000000..86a26a0 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isElement.js @@ -0,0 +1,27 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isEmpty.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isEmpty.js b/node_modules/lodash-node/underscore/objects/isEmpty.js new file mode 100644 index 0000000..1b90fb5 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isEmpty.js @@ -0,0 +1,54 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var isArray = require('./isArray'), + isString = require('./isString'); + +/** Used for native method references */ +var objectProto = Object.prototype; + +/** Native method shortcuts */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * 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) { + if (!value) { + return true; + } + if (isArray(value) || isString(value)) { + return !value.length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isEqual.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isEqual.js b/node_modules/lodash-node/underscore/objects/isEqual.js new file mode 100644 index 0000000..741f165 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isEqual.js @@ -0,0 +1,53 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var 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) { + return baseIsEqual(a, b); +} + +module.exports = isEqual; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isFinite.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isFinite.js b/node_modules/lodash-node/underscore/objects/isFinite.js new file mode 100644 index 0000000..bc29c51 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isFinite.js @@ -0,0 +1,46 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isFunction.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isFunction.js b/node_modules/lodash-node/underscore/objects/isFunction.js new file mode 100644 index 0000000..2ef33dc --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isFunction.js @@ -0,0 +1,42 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isNaN.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isNaN.js b/node_modules/lodash-node/underscore/objects/isNaN.js new file mode 100644 index 0000000..cc807b7 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isNaN.js @@ -0,0 +1,42 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isNull.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isNull.js b/node_modules/lodash-node/underscore/objects/isNull.js new file mode 100644 index 0000000..8dc0797 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isNull.js @@ -0,0 +1,30 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isNumber.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isNumber.js b/node_modules/lodash-node/underscore/objects/isNumber.js new file mode 100644 index 0000000..f9d88af --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isNumber.js @@ -0,0 +1,39 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isObject.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isObject.js b/node_modules/lodash-node/underscore/objects/isObject.js new file mode 100644 index 0000000..53ceabb --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isObject.js @@ -0,0 +1,39 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isRegExp.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isRegExp.js b/node_modules/lodash-node/underscore/objects/isRegExp.js new file mode 100644 index 0000000..48626e5 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isRegExp.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isString.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isString.js b/node_modules/lodash-node/underscore/objects/isString.js new file mode 100644 index 0000000..e8df7c4 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isString.js @@ -0,0 +1,37 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/isUndefined.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/isUndefined.js b/node_modules/lodash-node/underscore/objects/isUndefined.js new file mode 100644 index 0000000..4d54db3 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/isUndefined.js @@ -0,0 +1,27 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/keys.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/keys.js b/node_modules/lodash-node/underscore/objects/keys.js new file mode 100644 index 0000000..ae7401d --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/keys.js @@ -0,0 +1,36 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var isNative = require('../internals/isNative'), + isObject = require('./isObject'), + shimKeys = require('../internals/shimKeys'); + +/* 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 []; + } + return nativeKeys(object); +}; + +module.exports = keys; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/omit.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/omit.js b/node_modules/lodash-node/underscore/objects/omit.js new file mode 100644 index 0000000..33c65ae --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/omit.js @@ -0,0 +1,57 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var baseDifference = require('../internals/baseDifference'), + baseFlatten = require('../internals/baseFlatten'), + 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) { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference(props, baseFlatten(arguments, true, false, 1)); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + return result; +} + +module.exports = omit; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/pairs.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/pairs.js b/node_modules/lodash-node/underscore/objects/pairs.js new file mode 100644 index 0000000..ea8c7ae --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/pairs.js @@ -0,0 +1,38 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/pick.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/pick.js b/node_modules/lodash-node/underscore/objects/pick.js new file mode 100644 index 0000000..d195fb5 --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/pick.js @@ -0,0 +1,53 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var baseFlatten = require('../internals/baseFlatten'); + +/** + * 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) { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; +} + +module.exports = pick; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/objects/values.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/objects/values.js b/node_modules/lodash-node/underscore/objects/values.js new file mode 100644 index 0000000..d11055e --- /dev/null +++ b/node_modules/lodash-node/underscore/objects/values.js @@ -0,0 +1,36 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/support.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/support.js b/node_modules/lodash-node/underscore/support.js new file mode 100644 index 0000000..90fbe96 --- /dev/null +++ b/node_modules/lodash-node/underscore/support.js @@ -0,0 +1,46 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var isNative = require('./internals/isNative'); + +/** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ +var support = {}; + +(function() { + var object = { '0': 1, 'length': 1 }; + + /** + * 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]); +}(1)); + +module.exports = support; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities.js b/node_modules/lodash-node/underscore/utilities.js new file mode 100644 index 0000000..cef5f20 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities.js @@ -0,0 +1,26 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ + +module.exports = { + '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'), + '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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/escape.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/escape.js b/node_modules/lodash-node/underscore/utilities/escape.js new file mode 100644 index 0000000..2e1f5c0 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/escape.js @@ -0,0 +1,31 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/identity.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/identity.js b/node_modules/lodash-node/underscore/utilities/identity.js new file mode 100644 index 0000000..5734880 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/identity.js @@ -0,0 +1,28 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/mixin.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/mixin.js b/node_modules/lodash-node/underscore/utilities/mixin.js new file mode 100644 index 0000000..9865704 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/mixin.js @@ -0,0 +1,74 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/license> + */ +var forEach = require('../collections/forEach'), + functions = require('../objects/functions'), + isFunction = require('../objects/isFunction'); + +/** + * 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) { + var ctor = object, + isFunc = isFunction(ctor); + + forEach(functions(source), function(methodName) { + var func = object[methodName] = source[methodName]; + if (isFunc) { + ctor.prototype[methodName] = function() { + var args = [this.__wrapped__]; + push.apply(args, arguments); + + var result = func.apply(object, args); + if (this.__chain__) { + result = new ctor(result); + result.__chain__ = true; + } + return result; + }; + } + }); +} + +module.exports = mixin; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/noConflict.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/noConflict.js b/node_modules/lodash-node/underscore/utilities/noConflict.js new file mode 100644 index 0000000..349a093 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/noConflict.js @@ -0,0 +1,30 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/noop.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/noop.js b/node_modules/lodash-node/underscore/utilities/noop.js new file mode 100644 index 0000000..2756a24 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/noop.js @@ -0,0 +1,26 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/now.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/now.js b/node_modules/lodash-node/underscore/utilities/now.js new file mode 100644 index 0000000..c340513 --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/now.js @@ -0,0 +1,28 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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-osx/blob/7a58a67b/node_modules/lodash-node/underscore/utilities/property.js ---------------------------------------------------------------------- diff --git a/node_modules/lodash-node/underscore/utilities/property.js b/node_modules/lodash-node/underscore/utilities/property.js new file mode 100644 index 0000000..232d11d --- /dev/null +++ b/node_modules/lodash-node/underscore/utilities/property.js @@ -0,0 +1,40 @@ +/** + * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> + * Build: `lodash modularize underscore exports="node" -o ./underscore/` + * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> + * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <http://lodash.com/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; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
