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 9ECA018E8A for ; Thu, 3 Dec 2015 02:33:36 +0000 (UTC) Received: (qmail 1815 invoked by uid 500); 3 Dec 2015 02:33:36 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 1696 invoked by uid 500); 3 Dec 2015 02:33:36 -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 99855 invoked by uid 99); 3 Dec 2015 02:33:34 -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; Thu, 03 Dec 2015 02:33:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6DB81E67E3; Thu, 3 Dec 2015 02:33:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Date: Thu, 03 Dec 2015 02:33:57 -0000 Message-Id: <6dcb645c161c40bf8027c879f0aaee88@git.apache.org> In-Reply-To: <26b8fe5d8aca41ee85a09cd6abb4a4f1@git.apache.org> References: <26b8fe5d8aca41ee85a09cd6abb4a4f1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [25/51] [partial] ios commit: CB-9827 Implement and expose PlatformApi for iOS http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLStringifier.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLStringifier.js b/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLStringifier.js new file mode 100644 index 0000000..460b626 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLStringifier.js @@ -0,0 +1,163 @@ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLStringifier, + __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + __hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = __bind(this.assertLegalChar, this); + var key, value, _ref; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + _ref = (options != null ? options.stringify : void 0) || {}; + for (key in _ref) { + if (!__hasProp.call(_ref, key)) continue; + value = _ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.escape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(this.escape(val)); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.escape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) { + throw new Error("Invalid encoding: " + options.val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.convertListKey = '#list'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.escape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); + }; + + return XMLStringifier; + + })(); + +}).call(this); http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLText.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLText.js b/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLText.js new file mode 100644 index 0000000..9afe447 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/lib/XMLText.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLNode, XMLText, _, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + _ = require('lodash-node'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLText = (function(_super) { + __extends(XMLText, _super); + + function XMLText(parent, text) { + this.parent = parent; + XMLText.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing element text"); + } + this.value = this.stringify.eleText(text); + } + + XMLText.prototype.clone = function() { + return _.create(XMLText.prototype, this); + }; + + XMLText.prototype.toString = function(options, level) { + var indent, newline, pretty, r, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (options != null ? options.indent : void 0) || ' '; + newline = (options != null ? options.newline : void 0) || '\n'; + level || (level = 0); + space = new Array(level + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLText; + + })(XMLNode); + +}).call(this); http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/lib/index.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/lib/index.js b/bin/node_modules/plist/node_modules/xmlbuilder/lib/index.js new file mode 100644 index 0000000..cd9ac48 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/lib/index.js @@ -0,0 +1,14 @@ +// Generated by CoffeeScript 1.6.3 +(function() { + var XMLBuilder, _; + + _ = require('lodash-node'); + + XMLBuilder = require('./XMLBuilder'); + + module.exports.create = function(name, xmldec, doctype, options) { + options = _.extend({}, xmldec, doctype, options); + return new XMLBuilder(name, options).root(); + }; + +}).call(this); http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/LICENSE.txt ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/LICENSE.txt b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/LICENSE.txt new file mode 100644 index 0000000..49869bb --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2013 The Dojo Foundation +Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/README.md ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/README.md b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/README.md new file mode 100644 index 0000000..3bc410e --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/README.md @@ -0,0 +1,44 @@ +# lodash-node v2.4.1 + +A collection of [Lo-Dash](http://lodash.com/) methods as [Node.js](http://nodejs.org/) modules generated by [lodash-cli](https://npmjs.org/package/lodash-cli). + +## Installation & usage + +Using [`npm`](http://npmjs.org/): + +```bash +npm i --save lodash-node + +{sudo} npm i -g lodash-node +npm ln lodash-node +``` + +In Node.js: + +```js +var _ = require('lodash-node'); + +// or as Underscore +var _ = require('lodash-node/underscore'); + +// or by method category +var collections = require('lodash-node/modern/collections'); + +// or individual methods +var isEqual = require('lodash-node/modern/objects/isEqual'); +var findWhere = require('lodash-node/underscore/collections/findWhere'); +``` + +## Author + +| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | +|---| +| [John-David Dalton](http://allyoucanleet.com/) | + +## Contributors + +| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---|---|---| +| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash-node/trend.png)](https://bitdeli.com/free "Bitdeli Badge") http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays.js new file mode 100644 index 0000000..86f6dcf --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays.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 + */ + +module.exports = { + 'compact': require('./arrays/compact'), + 'difference': require('./arrays/difference'), + 'drop': require('./arrays/rest'), + 'findIndex': require('./arrays/findIndex'), + 'findLastIndex': require('./arrays/findLastIndex'), + 'first': require('./arrays/first'), + 'flatten': require('./arrays/flatten'), + 'head': require('./arrays/first'), + 'indexOf': require('./arrays/indexOf'), + 'initial': require('./arrays/initial'), + 'intersection': require('./arrays/intersection'), + 'last': require('./arrays/last'), + 'lastIndexOf': require('./arrays/lastIndexOf'), + 'object': require('./arrays/zipObject'), + 'pull': require('./arrays/pull'), + 'range': require('./arrays/range'), + 'remove': require('./arrays/remove'), + 'rest': require('./arrays/rest'), + 'sortedIndex': require('./arrays/sortedIndex'), + 'tail': require('./arrays/rest'), + 'take': require('./arrays/first'), + 'union': require('./arrays/union'), + 'uniq': require('./arrays/uniq'), + 'unique': require('./arrays/uniq'), + 'unzip': require('./arrays/zip'), + 'without': require('./arrays/without'), + 'xor': require('./arrays/xor'), + 'zip': require('./arrays/zip'), + 'zipObject': require('./arrays/zipObject') +}; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/compact.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/compact.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/compact.js new file mode 100644 index 0000000..f52dc22 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/compact.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 + */ + +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result.push(value); + } + } + return result; +} + +module.exports = compact; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/difference.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/difference.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/difference.js new file mode 100644 index 0000000..f646752 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/difference.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 baseDifference = require('../internals/baseDifference'), + baseFlatten = require('../internals/baseFlatten'); + +/** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ +function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); +} + +module.exports = difference; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findIndex.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findIndex.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findIndex.js new file mode 100644 index 0000000..cabf7c0 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findIndex.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 createCallback = require('../functions/createCallback'); + +/** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * 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 Arrays + * @param {Array} array The array to search. + * @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 {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ +function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + + callback = createCallback(callback, thisArg, 3); + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = findIndex; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findLastIndex.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findLastIndex.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findLastIndex.js new file mode 100644 index 0000000..2a74e31 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/findLastIndex.js @@ -0,0 +1,63 @@ +/** + * 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'); + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * 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 Arrays + * @param {Array} array The array to search. + * @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 {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ +function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = createCallback(callback, thisArg, 3); + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + return -1; +} + +module.exports = findLastIndex; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/first.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/first.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/first.js new file mode 100644 index 0000000..c4b1c38 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/first.js @@ -0,0 +1,86 @@ +/** + * 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'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * 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 _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. 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 {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ +function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + return slice(array, 0, nativeMin(nativeMax(0, n), length)); +} + +module.exports = first; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/flatten.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/flatten.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/flatten.js new file mode 100644 index 0000000..54dc494 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/flatten.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 baseFlatten = require('../internals/baseFlatten'), + map = require('../collections/map'); + +/** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * 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 Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @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 flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ +function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow; + isShallow = false; + } + if (callback != null) { + array = map(array, callback, thisArg); + } + return baseFlatten(array, isShallow); +} + +module.exports = flatten; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/indexOf.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/indexOf.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/indexOf.js new file mode 100644 index 0000000..19238b5 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/indexOf.js @@ -0,0 +1,50 @@ +/** + * 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 baseIndexOf = require('../internals/baseIndexOf'), + sortedIndex = require('./sortedIndex'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0); + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + return baseIndexOf(array, value, fromIndex); +} + +module.exports = indexOf; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/initial.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/initial.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/initial.js new file mode 100644 index 0000000..77ea68b --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/initial.js @@ -0,0 +1,82 @@ +/** + * 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'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * 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 Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. 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 slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ +function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : callback || n; + } + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); +} + +module.exports = initial; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/intersection.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/intersection.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/intersection.js new file mode 100644 index 0000000..fd7bf65 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/intersection.js @@ -0,0 +1,83 @@ +/** + * 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 baseIndexOf = require('../internals/baseIndexOf'), + cacheIndexOf = require('../internals/cacheIndexOf'), + createCache = require('../internals/createCache'), + getArray = require('../internals/getArray'), + isArguments = require('../objects/isArguments'), + isArray = require('../objects/isArray'), + largeArraySize = require('../internals/largeArraySize'), + releaseArray = require('../internals/releaseArray'), + releaseObject = require('../internals/releaseObject'); + +/** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ +function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = baseIndexOf, + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push(trustIndexOf && value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen)); + } + } + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: + while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) { + argsIndex = argsLength; + (cache || seen).push(value); + while (--argsIndex) { + cache = caches[argsIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) { + continue outer; + } + } + result.push(value); + } + } + while (argsLength--) { + cache = caches[argsLength]; + if (cache) { + releaseObject(cache); + } + } + releaseArray(caches); + releaseArray(seen); + return result; +} + +module.exports = intersection; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/last.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/last.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/last.js new file mode 100644 index 0000000..b54f370 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/last.js @@ -0,0 +1,84 @@ +/** + * 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'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * 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 Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. 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 {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ +function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = createCallback(callback, thisArg, 3); + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + return slice(array, nativeMax(0, length - n)); +} + +module.exports = last; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/lastIndexOf.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/lastIndexOf.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/lastIndexOf.js new file mode 100644 index 0000000..c7b8817 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/lastIndexOf.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 + */ + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * 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 Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = lastIndexOf; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/pull.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/pull.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/pull.js new file mode 100644 index 0000000..d7f60d0 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/pull.js @@ -0,0 +1,57 @@ +/** + * 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 for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ +var arrayRef = []; + +/** Native method shortcuts */ +var splice = arrayRef.splice; + +/** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ +function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + return array; +} + +module.exports = pull; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/range.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/range.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/range.js new file mode 100644 index 0000000..5ea7f49 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/range.js @@ -0,0 +1,69 @@ +/** + * 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 */ +var ceil = Math.ceil; + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : (+step || 1); + + if (end == null) { + end = start; + start = 0; + } + // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + return result; +} + +module.exports = range; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/remove.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/remove.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/remove.js new file mode 100644 index 0000000..7c0f8f0 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/remove.js @@ -0,0 +1,71 @@ +/** + * 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'); + +/** + * 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 splice = arrayRef.splice; + +/** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * 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 Arrays + * @param {Array} array The array to modify. + * @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 array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ +function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + + callback = createCallback(callback, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + return result; +} + +module.exports = remove; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/rest.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/rest.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/rest.js new file mode 100644 index 0000000..d778fb6 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/rest.js @@ -0,0 +1,83 @@ +/** + * 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'), + slice = require('../internals/slice'); + +/* Native method shortcuts for methods with the same name as other `lodash` methods */ +var nativeMax = Math.max; + +/** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * 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 _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. 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 slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ +function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + + callback = createCallback(callback, thisArg, 3); + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); + } + return slice(array, n); +} + +module.exports = rest; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/sortedIndex.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/sortedIndex.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/sortedIndex.js new file mode 100644 index 0000000..1bcb5b5 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/sortedIndex.js @@ -0,0 +1,77 @@ +/** + * 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'), + identity = require('../utilities/identity'); + +/** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * 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 Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @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 {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ +function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; + + // explicitly reference `identity` for better inlining in Firefox + callback = callback ? createCallback(callback, thisArg, 1) : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + (callback(array[mid]) < value) + ? low = mid + 1 + : high = mid; + } + return low; +} + +module.exports = sortedIndex; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/union.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/union.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/union.js new file mode 100644 index 0000000..854f7b1 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/union.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 + */ +var baseFlatten = require('../internals/baseFlatten'), + baseUniq = require('../internals/baseUniq'); + +/** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ +function union() { + return baseUniq(baseFlatten(arguments, true, true)); +} + +module.exports = union; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/uniq.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/uniq.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/uniq.js new file mode 100644 index 0000000..50df292 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/uniq.js @@ -0,0 +1,69 @@ +/** + * 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 baseUniq = require('../internals/baseUniq'), + createCallback = require('../functions/createCallback'); + +/** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * 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 _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @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 duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted; + isSorted = false; + } + if (callback != null) { + callback = createCallback(callback, thisArg, 3); + } + return baseUniq(array, isSorted, callback); +} + +module.exports = uniq; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/without.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/without.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/without.js new file mode 100644 index 0000000..5fda56c --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/without.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 baseDifference = require('../internals/baseDifference'), + slice = require('../internals/slice'); + +/** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ +function without(array) { + return baseDifference(array, slice(arguments, 1)); +} + +module.exports = without; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/xor.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/xor.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/xor.js new file mode 100644 index 0000000..1a444a1 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/xor.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 + */ +var baseDifference = require('../internals/baseDifference'), + baseUniq = require('../internals/baseUniq'), + isArguments = require('../objects/isArguments'), + isArray = require('../objects/isArray'); + +/** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ +function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq(baseDifference(result, array).concat(baseDifference(array, result))) + : array; + } + } + return result || []; +} + +module.exports = xor; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zip.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zip.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zip.js new file mode 100644 index 0000000..7d3d6e6 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zip.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 + */ +var max = require('../collections/max'), + pluck = require('../collections/pluck'); + +/** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ +function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + return result; +} + +module.exports = zip; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zipObject.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zipObject.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zipObject.js new file mode 100644 index 0000000..6f901ef --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/arrays/zipObject.js @@ -0,0 +1,48 @@ +/** + * 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 isArray = require('../objects/isArray'); + +/** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ +function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + while (++index < length) { + var key = keys[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; +} + +module.exports = zipObject; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining.js new file mode 100644 index 0000000..6cde453 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining.js @@ -0,0 +1,17 @@ +/** + * 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 = { + 'chain': require('./chaining/chain'), + 'tap': require('./chaining/tap'), + 'value': require('./chaining/wrapperValueOf'), + 'wrapperChain': require('./chaining/wrapperChain'), + 'wrapperToString': require('./chaining/wrapperToString'), + 'wrapperValueOf': require('./chaining/wrapperValueOf') +}; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/chain.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/chain.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/chain.js new file mode 100644 index 0000000..d613c55 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/chain.js @@ -0,0 +1,41 @@ +/** + * 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 lodashWrapper = require('../internals/lodashWrapper'); + +/** + * Creates a `lodash` object that wraps the given value with explicit + * method chaining enabled. + * + * @static + * @memberOf _ + * @category Chaining + * @param {*} value The value to wrap. + * @returns {Object} Returns the wrapper object. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(characters) + * .sortBy('age') + * .map(function(chr) { return chr.name + ' is ' + chr.age; }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + value = new lodashWrapper(value); + value.__chain__ = true; + return value; +} + +module.exports = chain; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/tap.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/tap.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/tap.js new file mode 100644 index 0000000..0be66d3 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/tap.js @@ -0,0 +1,35 @@ +/** + * 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 + */ + +/** + * Invokes `interceptor` with the `value` as the first argument and then + * returns `value`. The purpose of this method is to "tap into" a method + * chain in order to perform operations on intermediate results within + * the chain. + * + * @static + * @memberOf _ + * @category Chaining + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3, 4]) + * .tap(function(array) { array.pop(); }) + * .reverse() + * .value(); + * // => [3, 2, 1] + */ +function tap(value, interceptor) { + interceptor(value); + return value; +} + +module.exports = tap; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperChain.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperChain.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperChain.js new file mode 100644 index 0000000..e6bf9a8 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperChain.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 + */ + +/** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chaining + * @returns {*} Returns the wrapper object. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(characters).first(); + * // => { 'name': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(characters).chain() + * .first() + * .pick('age') + * .value(); + * // => { 'age': 36 } + */ +function wrapperChain() { + this.__chain__ = true; + return this; +} + +module.exports = wrapperChain; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperToString.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperToString.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperToString.js new file mode 100644 index 0000000..393d86d --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperToString.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 + */ + +/** + * Produces the `toString` result of the wrapped value. + * + * @name toString + * @memberOf _ + * @category Chaining + * @returns {string} Returns the string result. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ +function wrapperToString() { + return String(this.__wrapped__); +} + +module.exports = wrapperToString; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperValueOf.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperValueOf.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperValueOf.js new file mode 100644 index 0000000..96bd2f4 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/chaining/wrapperValueOf.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 support = require('../support'); + +/** + * Extracts the wrapped value. + * + * @name valueOf + * @memberOf _ + * @alias value + * @category Chaining + * @returns {*} Returns the wrapped value. + * @example + * + * _([1, 2, 3]).valueOf(); + * // => [1, 2, 3] + */ +function wrapperValueOf() { + return this.__wrapped__; +} + +module.exports = wrapperValueOf; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections.js new file mode 100644 index 0000000..5d2fc99 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections.js @@ -0,0 +1,49 @@ +/** + * 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 = { + 'all': require('./collections/every'), + 'any': require('./collections/some'), + 'at': require('./collections/at'), + 'collect': require('./collections/map'), + 'contains': require('./collections/contains'), + 'countBy': require('./collections/countBy'), + 'detect': require('./collections/find'), + 'each': require('./collections/forEach'), + 'eachRight': require('./collections/forEachRight'), + 'every': require('./collections/every'), + 'filter': require('./collections/filter'), + 'find': require('./collections/find'), + 'findLast': require('./collections/findLast'), + 'findWhere': require('./collections/find'), + 'foldl': require('./collections/reduce'), + 'foldr': require('./collections/reduceRight'), + 'forEach': require('./collections/forEach'), + 'forEachRight': require('./collections/forEachRight'), + 'groupBy': require('./collections/groupBy'), + 'include': require('./collections/contains'), + 'indexBy': require('./collections/indexBy'), + 'inject': require('./collections/reduce'), + 'invoke': require('./collections/invoke'), + 'map': require('./collections/map'), + 'max': require('./collections/max'), + 'min': require('./collections/min'), + 'pluck': require('./collections/pluck'), + 'reduce': require('./collections/reduce'), + 'reduceRight': require('./collections/reduceRight'), + 'reject': require('./collections/reject'), + 'sample': require('./collections/sample'), + 'select': require('./collections/filter'), + 'shuffle': require('./collections/shuffle'), + 'size': require('./collections/size'), + 'some': require('./collections/some'), + 'sortBy': require('./collections/sortBy'), + 'toArray': require('./collections/toArray'), + 'where': require('./collections/where') +}; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/26cca47e/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections/at.js ---------------------------------------------------------------------- diff --git a/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections/at.js b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections/at.js new file mode 100644 index 0000000..a994bb7 --- /dev/null +++ b/bin/node_modules/plist/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections/at.js @@ -0,0 +1,50 @@ +/** + * 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'), + isString = require('../objects/isString'), + support = require('../support'); + +/** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ +function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length, + result = Array(length); + + if (support.unindexedChars && isString(collection)) { + collection = collection.split(''); + } + while(++index < length) { + result[index] = collection[props[index]]; + } + return result; +} + +module.exports = at; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org