diff --git a/LICENSE.txt b/LICENSE.txt index 49869bbab..e23f4fbb3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, +Copyright 2012-2014 The Dojo Foundation +Based on Underscore.js 1.5.2, copyright 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 48f70a68e..33b4dc879 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -2,7 +2,7 @@ * @license * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash -o ./dist/lodash.compat.js` - * Copyright 2012-2013 The Dojo Foundation + * Copyright 2012-2014 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license diff --git a/dist/lodash.js b/dist/lodash.js index c569b1416..1469ce784 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -2,7 +2,7 @@ * @license * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modern -o ./dist/lodash.js` - * Copyright 2012-2013 The Dojo Foundation + * Copyright 2012-2014 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index 54b07b7f4..5792ceb97 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -2,7 +2,7 @@ * @license * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` - * Copyright 2012-2013 The Dojo Foundation + * Copyright 2012-2014 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license diff --git a/lodash.js b/lodash.js index dec066f75..461913287 100644 --- a/lodash.js +++ b/lodash.js @@ -1,7 +1,7 @@ /** * @license * Lo-Dash 2.4.1 - * Copyright 2012-2013 The Dojo Foundation + * Copyright 2012-2014 The Dojo Foundation * Based on Underscore.js 1.5.2 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license diff --git a/vendor/benchmark.js/LICENSE.txt b/vendor/benchmark.js/LICENSE.txt index ae29abad4..4a9583d67 100644 --- a/vendor/benchmark.js/LICENSE.txt +++ b/vendor/benchmark.js/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2010-2013 Mathias Bynens +Copyright 2010-2014 Mathias Bynens Based on JSLitmus.js, copyright Robert Kieffer Modified by John-David Dalton diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index d8023dac9..21c964993 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -1,6 +1,6 @@ /*! * Benchmark.js v1.0.0 - * Copyright 2010-2013 Mathias Bynens + * Copyright 2010-2014 Mathias Bynens * Based on JSLitmus.js, copyright Robert Kieffer * Modified by John-David Dalton * Available under MIT license @@ -55,7 +55,7 @@ var contextProps = [ 'Array', 'Date', 'Function', 'Math', 'Object', 'RegExp', 'String', '_', 'clearTimeout', 'chrome', 'chromium', 'document', 'java', 'navigator', - 'performance', 'platform', 'process', 'runtime', 'setTimeout' + 'performance', 'phantom', 'platform', 'process', 'runtime', 'setTimeout' ]; /** Used to avoid hz of Infinity */ @@ -162,7 +162,8 @@ shift = arrayRef.shift, slice = arrayRef.slice, sqrt = Math.sqrt, - toString = objectProto.toString; + toString = objectProto.toString, + unshift = arrayRef.unshift; /** Detect DOM document object */ var doc = isHostType(context, 'document') && context.document; @@ -202,14 +203,6 @@ (function() { - /** - * Detect Adobe AIR. - * - * @memberOf Benchmark.support - * @type boolean - */ - support.air = isClassOf(context.runtime, 'ScriptBridgingProxyObject'); - /** * Detect if in a browser environment. * @@ -234,6 +227,14 @@ */ support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout'); + /** + * Detect if `Array#unshift` returns the new length of the array (all but IE < 8). + * + * @memberOf _.support + * @type boolean + */ + support.unshiftResult = !![].unshift(1); + /** * Detect if functions support decompilation. * @@ -429,12 +430,12 @@ */ function Event(type) { var event = this; + if (type instanceof Event) { + return type; + } return (event == null || event.constructor != Event) ? new Event(type) - : (type instanceof Event - ? type - : _.extend(event, { 'timeStamp': +new Date }, typeof type == 'string' ? { 'type': type } : type) - ); + : _.assign(event, { 'timeStamp': +new Date }, typeof type == 'string' ? { 'type': type } : type); } /** @@ -482,7 +483,7 @@ return new Suite(name, options); } // juggle arguments - if (isClassOf(name, 'Object')) { + if (_.isPlainObject(name)) { // 1 argument (options) options = name; } else { @@ -601,7 +602,7 @@ result = (result || '').replace(/^\s+|\s+$/g, ''); // detect strings containing only the "use strict" directive - return /^(?:\/\*+[\w|\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result) + return /^(?:\/\*+[\w\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result) ? '' : result; } @@ -644,7 +645,7 @@ * @returns {boolean} Returns `true` if the value can be coerced, else `false`. */ function isStringable(value) { - return _.has(value, 'toString') || isClassOf(value, 'String'); + return _.has(value, 'toString') || _.isString(value); } /** @@ -709,8 +710,9 @@ * @param {Object} [options={}] Options object. */ function setOptions(object, options) { - options = _.extend({}, object.constructor.options, options); - object.options = _.forOwn(options, function(value, key) { + options = object.options = _.assign({}, cloneDeep(object.constructor.options), cloneDeep(options)); + + _.forOwn(options, function(value, key) { if (value != null) { // add event listeners if (/^on[A-Z]/.test(key)) { @@ -960,7 +962,7 @@ args = slice.call(arguments, 2); } else { // 2 arguments (array, options) - options = _.extend(options, name); + options = _.assign(options, name); name = options.name; args = _.isArray(args = 'args' in options ? options.args : []) ? args : [args]; queued = options.queued; @@ -1107,7 +1109,7 @@ */ function cloneSuite(options) { var suite = this, - result = new suite.constructor(_.extend({}, suite.options, options)); + result = new suite.constructor(_.assign({}, suite.options, options)); // copy own properties _.forOwn(suite, function(value, key) { @@ -1130,7 +1132,7 @@ */ function filterSuite(callback) { var suite = this, - result = new suite.constructor; + result = new suite.constructor(suite.options); result.push.apply(result, filter(suite, callback)); return result; @@ -1386,11 +1388,10 @@ */ function clone(options) { var bench = this, - sample = bench.stats.sample, - result = new bench.constructor(_.extend({}, bench, options)); + result = new bench.constructor(_.assign({}, bench, options)); // correct the `options` object - result.options = _.extend({}, bench.options, options); + result.options = _.assign({}, cloneDeep(bench.options), cloneDeep(options)); // copy own custom properties _.forOwn(bench, function(value, key) { @@ -1463,70 +1464,72 @@ * @returns {Object} The benchmark instance. */ function reset() { - var data, - event, - bench = this, - index = 0, - changes = { 'length': 0 }, - queue = { 'length': 0 }; - + var bench = this; if (bench.running && !calledBy.abort) { // no worries, `reset()` is called within `abort()` calledBy.reset = true; bench.abort(); delete calledBy.reset; + return bench; } - else { - // a non-recursive solution to check if properties have changed - // http://www.jslab.dk/articles/non.recursive.preorder.traversal.part4 - data = { 'destination': bench, 'source': _.extend({}, bench.constructor.prototype, bench.options) }; - do { - _.forOwn(data.source, function(value, key) { - var changed, - destination = data.destination, - currValue = destination[key]; + var event, + index = 0, + changes = { 'length': 0 }, + queue = { 'length': 0 }; - // skip pseudo private properties like `_timerId` which could be a - // Java object in environments like RingoJS - if (key.charAt(0) == '_') { - return; - } - if (value && typeof value == 'object') { - if (_.isArray(value)) { - // check if an array value has changed to a non-array value - if (!_.isArray(currValue)) { - changed = currValue = []; - } - // or has changed its length - if (currValue.length != value.length) { - changed = currValue = currValue.slice(0, value.length); - currValue.length = value.length; - } - } - // check if an object has changed to a non-object value - else if (!currValue || typeof currValue != 'object') { - changed = currValue = {}; - } - // register a changed object - if (changed) { - changes[changes.length++] = { 'destination': destination, 'key': key, 'value': currValue }; - } - queue[queue.length++] = { 'destination': currValue, 'source': value }; - } - // register a changed primitive - else if (value !== currValue && !(value == null || _.isFunction(value))) { - changes[changes.length++] = { 'destination': destination, 'key': key, 'value': value }; - } - }); - } - while ((data = queue[index++])); + // a non-recursive solution to check if properties have changed + // http://www.jslab.dk/articles/non.recursive.preorder.traversal.part4 + var data = { + 'destination': bench, + 'source': _.assign({}, cloneDeep(bench.constructor.prototype), cloneDeep(bench.options)) + }; - // if changed emit the `reset` event and if it isn't cancelled reset the benchmark - if (changes.length && (bench.emit(event = Event('reset')), !event.cancelled)) { - _.each(changes, function(data) { - data.destination[data.key] = data.value; - }); - } + do { + _.forOwn(data.source, function(value, key) { + var changed, + destination = data.destination, + currValue = destination[key]; + + // skip pseudo private properties like `_timerId` which could be a + // Java object in environments like RingoJS + if (key.charAt(0) == '_') { + return; + } + if (value && typeof value == 'object') { + if (_.isArray(value)) { + // check if an array value has changed to a non-array value + if (!_.isArray(currValue)) { + changed = currValue = []; + } + // or has changed its length + if (currValue.length != value.length) { + changed = currValue = currValue.slice(0, value.length); + currValue.length = value.length; + } + } + // check if an object has changed to a non-object value + else if (!currValue || typeof currValue != 'object') { + changed = currValue = {}; + } + // register a changed object + if (changed) { + changes[changes.length++] = { 'destination': destination, 'key': key, 'value': currValue }; + } + queue[queue.length++] = { 'destination': currValue, 'source': value }; + } + // register a changed primitive + else if (value !== currValue && !(value == null || _.isFunction(value))) { + changes[changes.length++] = { 'destination': destination, 'key': key, 'value': value }; + } + }); + } + while ((data = queue[index++])); + + // if changed emit the `reset` event and if it isn't cancelled reset the benchmark + if (changes.length && (bench.emit(event = Event('reset')), !event.cancelled)) { + _.each(changes, function(data) { + data.destination[data.key] = data.value; + }); } return bench; } @@ -1633,7 +1636,7 @@ throw new Error('The test "' + name + '" is empty. This may be the result of dead code removal.'); } else if (!deferred) { - // pretest to determine if compiled code is exits early, usually by a + // pretest to determine if compiled code exits early, usually by a // rogue `return` statement, by checking for a return object with the uid bench.count = 1; compiled = (compiled.call(bench, context, timer) || {}).uid == templateData.uid && compiled; @@ -1689,7 +1692,7 @@ templateData.uid = uid + uidCounter++; - _.extend(templateData, { + _.assign(templateData, { 'setup': getSource(bench.setup, interpolate('m#.setup()')), 'fn': getSource(fn, interpolate('m#.fn(' + fnArg + ')')), 'fnArg': fnArg, @@ -1699,12 +1702,12 @@ // use API of chosen timer if (timer.unit == 'ns') { if (timer.ns.nanoTime) { - _.extend(templateData, { + _.assign(templateData, { 'begin': interpolate('s#=n#.nanoTime()'), 'end': interpolate('r#=(n#.nanoTime()-s#)/1e9') }); } else { - _.extend(templateData, { + _.assign(templateData, { 'begin': interpolate('s#=n#()'), 'end': interpolate('r#=n#(s#);r#=r#[0]+(r#[1]/1e9)') }); @@ -1712,24 +1715,24 @@ } else if (timer.unit == 'us') { if (timer.ns.stop) { - _.extend(templateData, { + _.assign(templateData, { 'begin': interpolate('s#=n#.start()'), 'end': interpolate('r#=n#.microseconds()/1e6') }); } else if (perfName) { - _.extend(templateData, { + _.assign(templateData, { 'begin': interpolate('s#=n#.' + perfName + '()'), 'end': interpolate('r#=(n#.' + perfName + '()-s#)/1e3') }); } else { - _.extend(templateData, { + _.assign(templateData, { 'begin': interpolate('s#=n#()'), 'end': interpolate('r#=(n#()-s#)/1e6') }); } } else { - _.extend(templateData, { + _.assign(templateData, { 'begin': interpolate('s#=new n#'), 'end': interpolate('r#=(new n#-s#)/1e3') }); @@ -1980,7 +1983,7 @@ // relative margin of error rme = (moe / mean) * 100 || 0; - _.extend(bench.stats, { + _.assign(bench.stats, { 'deviation': sd, 'mean': mean, 'moe': moe, @@ -2185,8 +2188,8 @@ // The bugginess continues as the `Benchmark` constructor has an argument // named `options` and Firefox 1 will not assign a value to `Benchmark.options`, // making it non-writable in the process, unless it is the first property - // assigned by for-in loop of `_.extend()`. - _.extend(Benchmark, { + // assigned by for-in loop of `_.assign()`. + _.assign(Benchmark, { /** * The default options copied by benchmark instances. @@ -2353,7 +2356,7 @@ 'version': '1.0.0' }); - _.extend(Benchmark, { + _.assign(Benchmark, { 'filter': filter, 'formatNumber': formatNumber, 'invoke': invoke, @@ -2369,7 +2372,7 @@ /*------------------------------------------------------------------------*/ - _.extend(Benchmark.prototype, { + _.assign(Benchmark.prototype, { /** * The number of times a test was executed. @@ -2613,7 +2616,7 @@ } }); - _.extend(Benchmark.prototype, { + _.assign(Benchmark.prototype, { 'abort': abort, 'clone': clone, 'compare': compare, @@ -2628,7 +2631,7 @@ /*------------------------------------------------------------------------*/ - _.extend(Deferred.prototype, { + _.assign(Deferred.prototype, { /** * The deferred benchmark instance. @@ -2663,13 +2666,13 @@ 'timeStamp': 0 }); - _.extend(Deferred.prototype, { + _.assign(Deferred.prototype, { 'resolve': resolve }); /*------------------------------------------------------------------------*/ - _.extend(Event.prototype, { + _.assign(Event.prototype, { /** * A flag to indicate if the emitters listener iteration is aborted. @@ -2750,7 +2753,7 @@ /*------------------------------------------------------------------------*/ - _.extend(Suite.prototype, { + _.assign(Suite.prototype, { /** * The number of benchmarks in the suite. @@ -2777,7 +2780,7 @@ 'running': false }); - _.extend(Suite.prototype, { + _.assign(Suite.prototype, { 'abort': abortSuite, 'add': add, 'clone': cloneSuite, @@ -2793,16 +2796,16 @@ 'run': runSuite, 'reverse': arrayRef.reverse, 'shift': shift, - 'slice': arrayRef.slice, + 'slice': slice, 'sort': arrayRef.sort, 'splice': arrayRef.splice, - 'unshift': arrayRef.unshift + 'unshift': unshift }); /*------------------------------------------------------------------------*/ // expose Deferred, Event, and Suite - _.extend(Benchmark, { + _.assign(Benchmark, { 'Deferred': Deferred, 'Event': Event, 'Suite': Suite @@ -2837,9 +2840,14 @@ }; }); } - // trigger clock's lazy define early to avoid a security error - if (support.air) { - clock({ '_original': { 'fn': noop, 'count': 1, 'options': {} } }); + // avoid buggy `Array#unshift` in IE < 8 which doesn't return the new + // length of the array + if (!support.unshiftResult) { + Suite.prototype.unshift = function() { + var value = this; + unshift.apply(value, arguments); + return value.length; + }; } return Benchmark; } diff --git a/vendor/docdown/LICENSE.txt b/vendor/docdown/LICENSE.txt index a7501f98d..6cc7b220b 100644 --- a/vendor/docdown/LICENSE.txt +++ b/vendor/docdown/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2011-2013 John-David Dalton +Copyright 2011-2014 John-David Dalton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/vendor/docdown/docdown.php b/vendor/docdown/docdown.php index b25ea915b..f031470d3 100644 --- a/vendor/docdown/docdown.php +++ b/vendor/docdown/docdown.php @@ -1,7 +1,7 @@ + * Copyright 2011-2014 John-David Dalton * Available under MIT license */ require(dirname(__FILE__) . '/src/DocDown/MarkdownGenerator.php'); diff --git a/vendor/platform.js/LICENSE.txt b/vendor/platform.js/LICENSE.txt index a7501f98d..6cc7b220b 100644 --- a/vendor/platform.js/LICENSE.txt +++ b/vendor/platform.js/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2011-2013 John-David Dalton +Copyright 2011-2014 John-David Dalton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/vendor/platform.js/platform.js b/vendor/platform.js/platform.js index 94ec91825..3f5d1d753 100644 --- a/vendor/platform.js/platform.js +++ b/vendor/platform.js/platform.js @@ -1,6 +1,6 @@ /*! * Platform.js v1.0.0 - * Copyright 2010-2013 John-David Dalton + * Copyright 2010-2014 John-David Dalton * Available under MIT license */ ;(function(root) { diff --git a/vendor/qunit-extras/LICENSE.txt b/vendor/qunit-extras/LICENSE.txt index a7501f98d..6cc7b220b 100644 --- a/vendor/qunit-extras/LICENSE.txt +++ b/vendor/qunit-extras/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2011-2013 John-David Dalton +Copyright 2011-2014 John-David Dalton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/vendor/qunit-extras/qunit-extras.js b/vendor/qunit-extras/qunit-extras.js index 074d45f4a..cef6a658a 100644 --- a/vendor/qunit-extras/qunit-extras.js +++ b/vendor/qunit-extras/qunit-extras.js @@ -1,6 +1,6 @@ /*! * QUnit Extras v1.0.0 - * Copyright 2011-2012 John-David Dalton + * Copyright 2011-2014 John-David Dalton * Based on a gist by Jörn Zaefferer * Available under MIT license */