From 72d505b2f11d9d9ab3b7da157fdab4d7ea019a55 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 25 Aug 2013 20:40:24 -0700 Subject: [PATCH] Update other vendors jsdoc comment blocks. Former-commit-id: 3dcc92abe376d4c83baf6d2307c0a4343d5dce31 --- vendor/benchmark.js/benchmark.js | 308 +++++++++++++++---------------- vendor/platform.js/platform.js | 106 +++++------ vendor/qunit-clib/qunit-clib.js | 40 ++-- 3 files changed, 227 insertions(+), 227 deletions(-) diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index 4bed27239..e9c49b29f 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -105,8 +105,8 @@ * * @static * @memberOf Benchmark - * @param {Object} [context=window] The context object. - * @returns {Function} Returns the `Benchmark` function. + * @param {object} [context=window] The context object. + * @returns {function} Returns the `Benchmark` function. */ function runInContext(context) { // exit early if unable to acquire lodash @@ -181,7 +181,7 @@ * * @static * @memberOf Benchmark - * @type Object + * @type object */ var support = {}; @@ -191,7 +191,7 @@ * Detect Adobe AIR. * * @memberOf Benchmark.support - * @type Boolean + * @type boolean */ support.air = isClassOf(context.runtime, 'ScriptBridgingProxyObject'); @@ -199,7 +199,7 @@ * Detect if in a browser environment. * * @memberOf Benchmark.support - * @type Boolean + * @type boolean */ support.browser = doc && isHostType(context, 'navigator') && !isHostType(context, 'phantom'); @@ -207,7 +207,7 @@ * Detect if Java is enabled/exposed. * * @memberOf Benchmark.support - * @type Boolean + * @type boolean */ support.java = isClassOf(context.java, 'JavaPackage'); @@ -215,7 +215,7 @@ * Detect if the Timers API exists. * * @memberOf Benchmark.support - * @type Boolean + * @type boolean */ support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout'); @@ -224,7 +224,7 @@ * * @name decompilation * @memberOf Benchmark.support - * @type Boolean + * @type boolean */ try { // Safari 2.x removes commas in object literals @@ -245,7 +245,7 @@ * Timer object used by `clock()` and `Deferred#resolve`. * * @private - * @type Object + * @type object */ var timer = { @@ -254,7 +254,7 @@ * * @private * @memberOf timer - * @type Function|Object + * @type {(function|object)} */ 'ns': Date, @@ -263,7 +263,7 @@ * * @private * @memberOf timer - * @param {Object} deferred The deferred instance. + * @param {object} deferred The deferred instance. */ 'start': null, // lazy defined in `clock()` @@ -272,7 +272,7 @@ * * @private * @memberOf timer - * @param {Object} deferred The deferred instance. + * @param {object} deferred The deferred instance. */ 'stop': null // lazy defined in `clock()` }; @@ -283,9 +283,9 @@ * The Benchmark constructor. * * @constructor - * @param {String} name A name to identify the benchmark. - * @param {Function|String} fn The test to benchmark. - * @param {Object} [options={}] Options object. + * @param {string} name A name to identify the benchmark. + * @param {(function|string)} fn The test to benchmark. + * @param {object} [options={}] Options object. * @example * * // basic usage (the `new` operator is optional) @@ -394,7 +394,7 @@ * * @constructor * @memberOf Benchmark - * @param {Object} clone The cloned benchmark instance. + * @param {object} clone The cloned benchmark instance. */ function Deferred(clone) { var deferred = this; @@ -410,7 +410,7 @@ * * @constructor * @memberOf Benchmark - * @param {String|Object} type The event type. + * @param {(object|string)} type The event type. */ function Event(type) { var event = this; @@ -427,8 +427,8 @@ * * @constructor * @memberOf Benchmark - * @param {String} name A name to identify the suite. - * @param {Object} [options={}] Options object. + * @param {string} name A name to identify the suite. + * @param {object} [options={}] Options object. * @example * * // basic usage (the `new` operator is optional) @@ -483,8 +483,8 @@ * A deep clone utility. * * @private - * @param {Mixed} value The value to clone. - * @returns {Mixed} The cloned value. + * @param {*} value The value to clone. + * @returns {*} The cloned value. */ var cloneDeep = _.partialRight(_.cloneDeep, function(value) { // do not clone non-Object objects @@ -497,9 +497,9 @@ * Creates a function from the given arguments string and body. * * @private - * @param {String} args The comma separated function arguments. - * @param {String} body The function body. - * @returns {Function} The new function. + * @param {string} args The comma separated function arguments. + * @param {string} body The function body. + * @returns {function} The new function. */ function createFunction() { // lazy define @@ -523,8 +523,8 @@ * Delay the execution of a function based on the benchmark's `delay` property. * * @private - * @param {Object} bench The benchmark instance. - * @param {Object} fn The function to execute. + * @param {object} bench The benchmark instance. + * @param {object} fn The function to execute. */ function delay(bench, fn) { bench._timerId = _.delay(fn, bench.delay * 1e3); @@ -545,8 +545,8 @@ * Gets the name of the first argument from a function's source. * * @private - * @param {Function} fn The function. - * @returns {String} The argument name. + * @param {function} fn The function. + * @returns {string} The argument name. */ function getFirstArgument(fn) { return (!_.has(fn, 'toString') && @@ -558,8 +558,8 @@ * See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms. * * @private - * @param {Array} sample The sample. - * @returns {Number} The geometric mean. + * @param {array} sample The sample. + * @returns {number} The geometric mean. */ function getGeometricMean(sample) { return pow(Math.E, _.reduce(sample, function(sum, x) { @@ -571,8 +571,8 @@ * Computes the arithmetic mean of a sample. * * @private - * @param {Array} sample The sample. - * @returns {Number} The mean. + * @param {array} sample The sample. + * @returns {number} The mean. */ function getMean(sample) { return (_.reduce(sample, function(sum, x) { @@ -584,9 +584,9 @@ * Gets the source code of a function. * * @private - * @param {Function} fn The function. - * @param {String} altSource A string used when a function's source code is unretrievable. - * @returns {String} The function's source code. + * @param {function} fn The function. + * @param {string} altSource A string used when a function's source code is unretrievable. + * @returns {string} The function's source code. */ function getSource(fn, altSource) { var result = altSource; @@ -609,9 +609,9 @@ * Checks if an object is of the specified class. * * @private - * @param {Mixed} value The value to check. - * @param {String} name The name of the class. - * @returns {Boolean} Returns `true` if the value is of the specified class, else `false`. + * @param {*} value The value to check. + * @param {string} name The name of the class. + * @returns {boolean} Returns `true` if the value is of the specified class, else `false`. */ function isClassOf(value, name) { return value != null && toString.call(value) == '[object ' + name + ']'; @@ -623,9 +623,9 @@ * types of "object", "function", or "unknown". * * @private - * @param {Mixed} object The owner of the property. - * @param {String} property The property to check. - * @returns {Boolean} Returns `true` if the property value is a non-primitive, else `false`. + * @param {*} object The owner of the property. + * @param {string} property The property to check. + * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. */ function isHostType(object, property) { if (object == null) { @@ -639,8 +639,8 @@ * Checks if a value can be safely coerced to a string. * * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the value can be coerced, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the value can be coerced, else `false`. */ function isStringable(value) { return _.has(value, 'toString') || isClassOf(value, 'String'); @@ -659,8 +659,8 @@ * A wrapper around require() to suppress `module missing` errors. * * @private - * @param {String} id The module id. - * @returns {Mixed} The exported module or `null`. + * @param {string} id The module id. + * @returns {*} The exported module or `null`. */ function req(id) { try { @@ -673,7 +673,7 @@ * Runs a snippet of JavaScript via script injection. * * @private - * @param {String} code The code to run. + * @param {string} code The code to run. */ function runScript(code) { var anchor = freeDefine ? define.amd : Benchmark, @@ -704,8 +704,8 @@ * A helper function for setting options/event handlers. * * @private - * @param {Object} object The benchmark or suite instance. - * @param {Object} [options={}] Options object. + * @param {object} object The benchmark or suite instance. + * @param {object} [options={}] Options object. */ function setOptions(object, options) { options = _.extend({}, object.constructor.options, options); @@ -758,10 +758,10 @@ * * @static * @memberOf Benchmark - * @param {Array} array The array to iterate over. - * @param {Function|String} callback The function/alias called per iteration. - * @param {Mixed} thisArg The `this` binding for the callback. - * @returns {Array} A new array of values that passed callback filter. + * @param {array} array The array to iterate over. + * @param {(function|string)} callback The function/alias called per iteration. + * @param {*} thisArg The `this` binding for the callback. + * @returns {array} A new array of values that passed callback filter. * @example * * // get odd numbers @@ -804,8 +804,8 @@ * * @static * @memberOf Benchmark - * @param {Number} number The number to convert. - * @returns {String} The more readable string representation. + * @param {number} number The number to convert. + * @returns {string} The more readable string representation. */ function formatNumber(number) { number = String(number).split('.'); @@ -818,10 +818,10 @@ * * @static * @memberOf Benchmark - * @param {Array} benches Array of benchmarks to iterate over. - * @param {String|Object} name The name of the method to invoke OR options object. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} A new array of values returned from each method invoked. + * @param {array} benches Array of benchmarks to iterate over. + * @param {(object|string)} name The name of the method to invoke OR options object. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {array} A new array of values returned from each method invoked. * @example * * // invoke `reset` on all benchmarks @@ -999,10 +999,10 @@ * * @static * @memberOf Benchmark - * @param {Array|Object} object The object to operate on. - * @param {String} [separator1=','] The separator used between key-value pairs. - * @param {String} [separator2=': '] The separator used between keys and values. - * @returns {String} The joined result. + * @param {(array|object)} object The object to operate on. + * @param {string} [separator1=','] The separator used between key-value pairs. + * @param {string} [separator2=': '] The separator used between keys and values. + * @returns {string} The joined result. */ function join(object, separator1, separator2) { var result = [], @@ -1023,7 +1023,7 @@ * * @name abort * @memberOf Benchmark.Suite - * @returns {Object} The suite instance. + * @returns {object} The suite instance. */ function abortSuite() { var event, @@ -1052,10 +1052,10 @@ * Adds a test to the benchmark suite. * * @memberOf Benchmark.Suite - * @param {String} name A name to identify the benchmark. - * @param {Function|String} fn The test to benchmark. - * @param {Object} [options={}] Options object. - * @returns {Object} The benchmark instance. + * @param {string} name A name to identify the benchmark. + * @param {(function|string)} fn The test to benchmark. + * @param {object} [options={}] Options object. + * @returns {object} The benchmark instance. * @example * * // basic usage @@ -1101,8 +1101,8 @@ * * @name clone * @memberOf Benchmark.Suite - * @param {Object} options Options object to overwrite cloned options. - * @returns {Object} The new suite instance. + * @param {object} options Options object to overwrite cloned options. + * @returns {object} The new suite instance. */ function cloneSuite(options) { var suite = this, @@ -1124,8 +1124,8 @@ * * @name filter * @memberOf Benchmark.Suite - * @param {Function|String} callback The function/alias called per iteration. - * @returns {Object} A new suite of benchmarks that passed callback filter. + * @param {(function|string)} callback The function/alias called per iteration. + * @returns {object} A new suite of benchmarks that passed callback filter. */ function filterSuite(callback) { var suite = this, @@ -1140,7 +1140,7 @@ * * @name reset * @memberOf Benchmark.Suite - * @returns {Object} The suite instance. + * @returns {object} The suite instance. */ function resetSuite() { var event, @@ -1169,8 +1169,8 @@ * * @name run * @memberOf Benchmark.Suite - * @param {Object} [options={}] Options object. - * @returns {Object} The suite instance. + * @param {object} [options={}] Options object. + * @returns {object} The suite instance. * @example * * // basic usage @@ -1215,8 +1215,8 @@ * Executes all registered listeners of the specified event type. * * @memberOf Benchmark, Benchmark.Suite - * @param {String|Object} type The event type or object. - * @returns {Mixed} Returns the return value of the last listener executed. + * @param {(object|string)} type The event type or object. + * @returns {*} Returns the return value of the last listener executed. */ function emit(type) { var listeners, @@ -1245,8 +1245,8 @@ * to add or remove listeners. * * @memberOf Benchmark, Benchmark.Suite - * @param {String} type The event type. - * @returns {Array} The listeners array. + * @param {string} type The event type. + * @returns {array} The listeners array. */ function listeners(type) { var object = this, @@ -1261,9 +1261,9 @@ * or unregisters all listeners for all event types. * * @memberOf Benchmark, Benchmark.Suite - * @param {String} [type] The event type. - * @param {Function} [listener] The function to unregister. - * @returns {Object} The benchmark instance. + * @param {string} [type] The event type. + * @param {function} [listener] The function to unregister. + * @returns {object} The benchmark instance. * @example * * // unregister a listener for an event type @@ -1312,9 +1312,9 @@ * Registers a listener for the specified event type(s). * * @memberOf Benchmark, Benchmark.Suite - * @param {String} type The event type. - * @param {Function} listener The function to register. - * @returns {Object} The benchmark instance. + * @param {string} type The event type. + * @param {function} listener The function to register. + * @returns {object} The benchmark instance. * @example * * // register a listener for an event type @@ -1342,7 +1342,7 @@ * Aborts the benchmark without recording times. * * @memberOf Benchmark - * @returns {Object} The benchmark instance. + * @returns {object} The benchmark instance. */ function abort() { var event, @@ -1375,8 +1375,8 @@ * Creates a new benchmark using the same test and options. * * @memberOf Benchmark - * @param {Object} options Options object to overwrite cloned options. - * @returns {Object} The new benchmark instance. + * @param {object} options Options object to overwrite cloned options. + * @returns {object} The new benchmark instance. * @example * * var bizarro = bench.clone({ @@ -1405,8 +1405,8 @@ * Determines if a benchmark is faster than another. * * @memberOf Benchmark - * @param {Object} other The benchmark to compare. - * @returns {Number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate. + * @param {object} other The benchmark to compare. + * @returns {number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate. */ function compare(other) { var critical, @@ -1459,7 +1459,7 @@ * Reset properties and abort if running. * * @memberOf Benchmark - * @returns {Object} The benchmark instance. + * @returns {object} The benchmark instance. */ function reset() { var data, @@ -1530,7 +1530,7 @@ * * @name toString * @memberOf Benchmark - * @returns {String} A string representation of the benchmark instance. + * @returns {string} A string representation of the benchmark instance. */ function toStringBench() { var bench = this, @@ -1557,8 +1557,8 @@ * Clocks the time taken to execute a test per cycle (secs). * * @private - * @param {Object} bench The benchmark instance. - * @returns {Number} The time taken. + * @param {object} bench The benchmark instance. + * @returns {number} The time taken. */ function clock() { var applet, @@ -1872,8 +1872,8 @@ * Computes stats on benchmark results. * * @private - * @param {Object} bench The benchmark instance. - * @param {Object} options The options object. + * @param {object} bench The benchmark instance. + * @param {object} options The options object. */ function compute(bench, options) { options || (options = {}); @@ -2026,8 +2026,8 @@ * Cycles a benchmark until a run `count` can be established. * * @private - * @param {Object} clone The cloned benchmark instance. - * @param {Object} options The options object. + * @param {object} clone The cloned benchmark instance. + * @param {object} options The options object. */ function cycle(clone, options) { options || (options = {}); @@ -2130,8 +2130,8 @@ * Runs the benchmark. * * @memberOf Benchmark - * @param {Object} [options={}] Options object. - * @returns {Object} The benchmark instance. + * @param {object} [options={}] Options object. + * @returns {object} The benchmark instance. * @example * * // basic usage @@ -2187,7 +2187,7 @@ * * @static * @memberOf Benchmark - * @type Object + * @type object */ 'options': { @@ -2196,7 +2196,7 @@ * by default. * * @memberOf Benchmark.options - * @type Boolean + * @type boolean */ 'async': false, @@ -2204,14 +2204,14 @@ * A flag to indicate that the benchmark clock is deferred. * * @memberOf Benchmark.options - * @type Boolean + * @type boolean */ 'defer': false, /** * The delay between test cycles (secs). * @memberOf Benchmark.options - * @type Number + * @type number */ 'delay': 0.005, @@ -2220,7 +2220,7 @@ * (auto-generated if absent). * * @memberOf Benchmark.options - * @type String + * @type string */ 'id': undefined, @@ -2228,7 +2228,7 @@ * The default number of times to execute a test on a benchmark's first cycle. * * @memberOf Benchmark.options - * @type Number + * @type number */ 'initCount': 1, @@ -2238,7 +2238,7 @@ * Note: Cycle delays aren't counted toward the maximum time. * * @memberOf Benchmark.options - * @type Number + * @type number */ 'maxTime': 5, @@ -2246,7 +2246,7 @@ * The minimum sample size required to perform statistical analysis. * * @memberOf Benchmark.options - * @type Number + * @type number */ 'minSamples': 5, @@ -2254,7 +2254,7 @@ * The time needed to reduce the percent uncertainty of measurement to 1% (secs). * * @memberOf Benchmark.options - * @type Number + * @type number */ 'minTime': 0, @@ -2262,7 +2262,7 @@ * The name of the benchmark. * * @memberOf Benchmark.options - * @type String + * @type string */ 'name': undefined, @@ -2270,7 +2270,7 @@ * An event listener called when the benchmark is aborted. * * @memberOf Benchmark.options - * @type Function + * @type function */ 'onAbort': undefined, @@ -2278,7 +2278,7 @@ * An event listener called when the benchmark completes running. * * @memberOf Benchmark.options - * @type Function + * @type function */ 'onComplete': undefined, @@ -2286,7 +2286,7 @@ * An event listener called after each run cycle. * * @memberOf Benchmark.options - * @type Function + * @type function */ 'onCycle': undefined, @@ -2294,7 +2294,7 @@ * An event listener called when a test errors. * * @memberOf Benchmark.options - * @type Function + * @type function */ 'onError': undefined, @@ -2302,7 +2302,7 @@ * An event listener called when the benchmark is reset. * * @memberOf Benchmark.options - * @type Function + * @type function */ 'onReset': undefined, @@ -2310,7 +2310,7 @@ * An event listener called when the benchmark starts running. * * @memberOf Benchmark.options - * @type Function + * @type function */ 'onStart': undefined }, @@ -2321,7 +2321,7 @@ * * @static * @memberOf Benchmark - * @type Object + * @type object */ 'platform': context.platform || req('platform') || ({ 'description': context.navigator && context.navigator.userAgent || null, @@ -2342,7 +2342,7 @@ * * @static * @memberOf Benchmark - * @type String + * @type string */ 'version': '1.0.0' }); @@ -2369,7 +2369,7 @@ * The number of times a test was executed. * * @memberOf Benchmark - * @type Number + * @type number */ 'count': 0, @@ -2377,7 +2377,7 @@ * The number of cycles performed while benchmarking. * * @memberOf Benchmark - * @type Number + * @type number */ 'cycles': 0, @@ -2385,7 +2385,7 @@ * The number of executions per second. * * @memberOf Benchmark - * @type Number + * @type number */ 'hz': 0, @@ -2393,7 +2393,7 @@ * The compiled test function. * * @memberOf Benchmark - * @type Function|String + * @type function|...string */ 'compiled': undefined, @@ -2401,7 +2401,7 @@ * The error object if the test failed. * * @memberOf Benchmark - * @type Object + * @type object */ 'error': undefined, @@ -2409,7 +2409,7 @@ * The test to benchmark. * * @memberOf Benchmark - * @type Function|String + * @type function|...string */ 'fn': undefined, @@ -2417,7 +2417,7 @@ * A flag to indicate if the benchmark is aborted. * * @memberOf Benchmark - * @type Boolean + * @type boolean */ 'aborted': false, @@ -2425,7 +2425,7 @@ * A flag to indicate if the benchmark is running. * * @memberOf Benchmark - * @type Boolean + * @type boolean */ 'running': false, @@ -2433,7 +2433,7 @@ * Compiled into the test and executed immediately **before** the test loop. * * @memberOf Benchmark - * @type Function|String + * @type function|...string * @example * * // basic usage @@ -2496,7 +2496,7 @@ * Compiled into the test and executed immediately **after** the test loop. * * @memberOf Benchmark - * @type Function|String + * @type function|...string */ 'teardown': noop, @@ -2504,7 +2504,7 @@ * An object of stats including mean, margin or error, and standard deviation. * * @memberOf Benchmark - * @type Object + * @type object */ 'stats': { @@ -2512,7 +2512,7 @@ * The margin of error. * * @memberOf Benchmark#stats - * @type Number + * @type number */ 'moe': 0, @@ -2520,7 +2520,7 @@ * The relative margin of error (expressed as a percentage of the mean). * * @memberOf Benchmark#stats - * @type Number + * @type number */ 'rme': 0, @@ -2528,7 +2528,7 @@ * The standard error of the mean. * * @memberOf Benchmark#stats - * @type Number + * @type number */ 'sem': 0, @@ -2536,7 +2536,7 @@ * The sample standard deviation. * * @memberOf Benchmark#stats - * @type Number + * @type number */ 'deviation': 0, @@ -2544,7 +2544,7 @@ * The sample arithmetic mean (secs). * * @memberOf Benchmark#stats - * @type Number + * @type number */ 'mean': 0, @@ -2560,7 +2560,7 @@ * The sample variance. * * @memberOf Benchmark#stats - * @type Number + * @type number */ 'variance': 0 }, @@ -2569,7 +2569,7 @@ * An object of timing data including cycle, elapsed, period, start, and stop. * * @memberOf Benchmark - * @type Object + * @type object */ 'times': { @@ -2577,7 +2577,7 @@ * The time taken to complete the last cycle (secs). * * @memberOf Benchmark#times - * @type Number + * @type number */ 'cycle': 0, @@ -2585,7 +2585,7 @@ * The time taken to complete the benchmark (secs). * * @memberOf Benchmark#times - * @type Number + * @type number */ 'elapsed': 0, @@ -2593,7 +2593,7 @@ * The time taken to execute the test once (secs). * * @memberOf Benchmark#times - * @type Number + * @type number */ 'period': 0, @@ -2601,7 +2601,7 @@ * A timestamp of when the benchmark started (ms). * * @memberOf Benchmark#times - * @type Number + * @type number */ 'timeStamp': 0 } @@ -2628,7 +2628,7 @@ * The deferred benchmark instance. * * @memberOf Benchmark.Deferred - * @type Object + * @type object */ 'benchmark': null, @@ -2636,7 +2636,7 @@ * The number of deferred cycles performed while benchmarking. * * @memberOf Benchmark.Deferred - * @type Number + * @type number */ 'cycles': 0, @@ -2644,7 +2644,7 @@ * The time taken to complete the deferred benchmark (secs). * * @memberOf Benchmark.Deferred - * @type Number + * @type number */ 'elapsed': 0, @@ -2652,7 +2652,7 @@ * A timestamp of when the deferred benchmark started (ms). * * @memberOf Benchmark.Deferred - * @type Number + * @type number */ 'timeStamp': 0 }); @@ -2669,7 +2669,7 @@ * A flag to indicate if the emitters listener iteration is aborted. * * @memberOf Benchmark.Event - * @type Boolean + * @type boolean */ 'aborted': false, @@ -2677,7 +2677,7 @@ * A flag to indicate if the default action is cancelled. * * @memberOf Benchmark.Event - * @type Boolean + * @type boolean */ 'cancelled': false, @@ -2685,7 +2685,7 @@ * The object whose listeners are currently being processed. * * @memberOf Benchmark.Event - * @type Object + * @type object */ 'currentTarget': undefined, @@ -2701,7 +2701,7 @@ * The object to which the event was originally emitted. * * @memberOf Benchmark.Event - * @type Object + * @type object */ 'target': undefined, @@ -2709,7 +2709,7 @@ * A timestamp of when the event was created (ms). * * @memberOf Benchmark.Event - * @type Number + * @type number */ 'timeStamp': 0, @@ -2717,7 +2717,7 @@ * The event type. * * @memberOf Benchmark.Event - * @type String + * @type string */ 'type': '' }); @@ -2729,7 +2729,7 @@ * * @static * @memberOf Benchmark.Suite - * @type Object + * @type object */ Suite.options = { @@ -2737,7 +2737,7 @@ * The name of the suite. * * @memberOf Benchmark.Suite.options - * @type String + * @type string */ 'name': undefined }; @@ -2750,7 +2750,7 @@ * The number of benchmarks in the suite. * * @memberOf Benchmark.Suite - * @type Number + * @type number */ 'length': 0, @@ -2758,7 +2758,7 @@ * A flag to indicate if the suite is aborted. * * @memberOf Benchmark.Suite - * @type Boolean + * @type boolean */ 'aborted': false, @@ -2766,7 +2766,7 @@ * A flag to indicate if the suite is running. * * @memberOf Benchmark.Suite - * @type Boolean + * @type boolean */ 'running': false }); diff --git a/vendor/platform.js/platform.js b/vendor/platform.js/platform.js index 985e55b50..815eb58dc 100644 --- a/vendor/platform.js/platform.js +++ b/vendor/platform.js/platform.js @@ -65,8 +65,8 @@ * Capitalizes a string value. * * @private - * @param {String} string The string to capitalize. - * @returns {String} The capitalized string. + * @param {string} string The string to capitalize. + * @returns {string} The capitalized string. */ function capitalize(string) { string = String(string); @@ -77,8 +77,8 @@ * An iteration utility for arrays and objects. * * @private - * @param {Array|Object} object The object to iterate over. - * @param {Function} callback The function called per iteration. + * @param {(array|object)} object The object to iterate over. + * @param {function} callback The function called per iteration. */ function each(object, callback) { var index = -1, @@ -97,8 +97,8 @@ * Trim and conditionally capitalize string values. * * @private - * @param {String} string The string to format. - * @returns {String} The formatted string. + * @param {string} string The string to format. + * @returns {string} The formatted string. */ function format(string) { string = trim(string); @@ -111,8 +111,8 @@ * Iterates over an object's own properties, executing the `callback` for each. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} callback The function executed per own property. + * @param {object} object The object to iterate over. + * @param {function} callback The function executed per own property. */ function forOwn(object, callback) { for (var key in object) { @@ -124,8 +124,8 @@ * Gets the internal [[Class]] of a value. * * @private - * @param {Mixed} value The value. - * @returns {String} The [[Class]]. + * @param {*} value The value. + * @returns {string} The [[Class]]. */ function getClassOf(value) { return value == null @@ -137,9 +137,9 @@ * Checks if an object has the specified key as a direct property. * * @private - * @param {Object} object The object to check. - * @param {String} key The key to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. + * @param {object} object The object to check. + * @param {string} key The key to check for. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. */ function hasKey() { // lazy define for others (not as accurate) @@ -173,9 +173,9 @@ * types of object, function, or unknown. * * @private - * @param {Mixed} object The owner of the property. - * @param {String} property The property to check. - * @returns {Boolean} Returns `true` if the property value is a non-primitive, else `false`. + * @param {*} object The owner of the property. + * @param {string} property The property to check. + * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. */ function isHostType(object, property) { var type = object != null ? typeof object[property] : 'number'; @@ -188,8 +188,8 @@ * spaces optional. * * @private - * @param {String} string The string to qualify. - * @returns {String} The qualified string. + * @param {string} string The string to qualify. + * @returns {string} The qualified string. */ function qualify(string) { return String(string).replace(/([ -])(?!$)/g, '$1?'); @@ -199,10 +199,10 @@ * A bare-bones` Array#reduce` like utility function. * * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} accumulator Initial value of the accumulator. - * @returns {Mixed} The accumulator. + * @param {array} array The array to iterate over. + * @param {function} callback The function called per iteration. + * @param {*} accumulator Initial value of the accumulator. + * @returns {*} The accumulator. */ function reduce(array, callback) { var accumulator = null; @@ -216,8 +216,8 @@ * Removes leading and trailing whitespace from a string. * * @private - * @param {String} string The string to trim. - * @returns {String} The trimmed string. + * @param {string} string The string to trim. + * @returns {string} The trimmed string. */ function trim(string) { return String(string).replace(/^ +| +$/g, ''); @@ -229,8 +229,8 @@ * Creates a new platform object. * * @memberOf platform - * @param {String} [ua = navigator.userAgent] The user agent string. - * @returns {Object} A platform object. + * @param {string} [ua = navigator.userAgent] The user agent string. + * @returns {object} A platform object. */ function parse(ua) { @@ -377,8 +377,8 @@ * Picks the layout engine from an array of guesses. * * @private - * @param {Array} guesses An array of guesses. - * @returns {String|Null} The detected layout engine. + * @param {array} guesses An array of guesses. + * @returns {(null|string)} The detected layout engine. */ function getLayout(guesses) { return reduce(guesses, function(result, guess) { @@ -392,8 +392,8 @@ * Picks the manufacturer from an array of guesses. * * @private - * @param {Array} guesses An array of guesses. - * @returns {String|Null} The detected manufacturer. + * @param {array} guesses An array of guesses. + * @returns {(null|string)} The detected manufacturer. */ function getManufacturer(guesses) { return reduce(guesses, function(result, value, key) { @@ -410,8 +410,8 @@ * Picks the browser name from an array of guesses. * * @private - * @param {Array} guesses An array of guesses. - * @returns {String|Null} The detected browser name. + * @param {array} guesses An array of guesses. + * @returns {(null|string)} The detected browser name. */ function getName(guesses) { return reduce(guesses, function(result, guess) { @@ -425,8 +425,8 @@ * Picks the OS name from an array of guesses. * * @private - * @param {Array} guesses An array of guesses. - * @returns {String|Null} The detected OS name. + * @param {array} guesses An array of guesses. + * @returns {(null|string)} The detected OS name. */ function getOS(guesses) { return reduce(guesses, function(result, guess) { @@ -475,8 +475,8 @@ * Picks the product name from an array of guesses. * * @private - * @param {Array} guesses An array of guesses. - * @returns {String|Null} The detected product name. + * @param {array} guesses An array of guesses. + * @returns {(null|string)} The detected product name. */ function getProduct(guesses) { return reduce(guesses, function(result, guess) { @@ -504,8 +504,8 @@ * Resolves the version using an array of UA patterns. * * @private - * @param {Array} patterns An array of UA patterns. - * @returns {String|Null} The detected version. + * @param {array} patterns An array of UA patterns. + * @returns {(null|string)} The detected version. */ function getVersion(patterns) { return reduce(patterns, function(result, pattern) { @@ -521,7 +521,7 @@ * * @name toString * @memberOf platform - * @returns {String} Returns `platform.description` if available, else an empty string. + * @returns {string} Returns `platform.description` if available, else an empty string. */ function toStringPlatform() { return this.description || ''; @@ -862,7 +862,7 @@ * The platform object. * * @name platform - * @type Object + * @type object */ return { @@ -870,7 +870,7 @@ * The browser/environment version. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'version': name && version && (description.unshift(version), version), @@ -878,7 +878,7 @@ * The name of the browser/environment. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'name': name && (description.unshift(name), name), @@ -886,7 +886,7 @@ * The name of the operating system. * * @memberOf platform - * @type Object + * @type object */ 'os': os ? (name && @@ -898,7 +898,7 @@ * The CPU architecture the OS is built for. * * @memberOf platform.os - * @type Number|Null + * @type number|Null */ 'architecture': null, @@ -906,7 +906,7 @@ * The family of the OS. * * @memberOf platform.os - * @type String|Null + * @type string|Null */ 'family': null, @@ -914,7 +914,7 @@ * The version of the OS. * * @memberOf platform.os - * @type String|Null + * @type string|Null */ 'version': null, @@ -922,7 +922,7 @@ * Returns the OS string. * * @memberOf platform.os - * @returns {String} The OS string. + * @returns {string} The OS string. */ 'toString': function() { return 'null'; } }, @@ -931,7 +931,7 @@ * The platform description. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'description': description.length ? description.join(' ') : ua, @@ -939,7 +939,7 @@ * The name of the browser layout engine. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'layout': layout && layout[0], @@ -947,7 +947,7 @@ * The name of the product's manufacturer. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'manufacturer': manufacturer, @@ -955,7 +955,7 @@ * The alpha/beta release indicator. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'prerelease': prerelease, @@ -963,7 +963,7 @@ * The name of the product hosting the browser. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'product': product, @@ -971,7 +971,7 @@ * The browser's user agent string. * * @memberOf platform - * @type String|Null + * @type string|Null */ 'ua': ua, diff --git a/vendor/qunit-clib/qunit-clib.js b/vendor/qunit-clib/qunit-clib.js index db3b8f3df..a74dbbf50 100644 --- a/vendor/qunit-clib/qunit-clib.js +++ b/vendor/qunit-clib/qunit-clib.js @@ -22,7 +22,7 @@ * Installs the CLI boilerplate additions on the given `context` object. * * @memberOf exports - * @param {Object} context The context object. + * @param {object} context The context object. */ function runInContext(context) { // exit early if no `context` is provided or if `QUnit` does not exist @@ -34,11 +34,11 @@ * Schedules timer-based callbacks. * * @private - * @param {Function|String} fn The function to call. - * @oaram {Number} delay The number of milliseconds to delay the `fn` call. + * @param {(function|string)} fn The function to call. + * @param {number} delay The number of milliseconds to delay the `fn` call. * @param [arg1, arg2, ...] Arguments to invoke `fn` with. - * @param {Boolean} repeated A flag to specify whether `fn` is called repeatedly. - * @returns {Number} The the ID of the timeout. + * @param {boolean} repeated A flag to specify whether `fn` is called repeatedly. + * @returns {number} The the ID of the timeout. */ function schedule(fn, delay, args, repeated) { // Rhino 1.7RC4 will error assigning `task` below @@ -70,7 +70,7 @@ * Clears the delay set by `setInterval` or `setTimeout`. * * @memberOf context - * @param {Number} id The ID of the timeout to be cleared. + * @param {number} id The ID of the timeout to be cleared. */ function clearTimer(id) { if (ids[id]) { @@ -84,10 +84,10 @@ * Executes a code snippet or function repeatedly, with a delay between each call. * * @memberOf context - * @param {Function|String} fn The function to call or string to evaluate. - * @oaram {Number} delay The number of milliseconds to delay each `fn` call. + * @param {(function|string)} fn The function to call or string to evaluate. + * @param {number} delay The number of milliseconds to delay each `fn` call. * @param [arg1, arg2, ...] Arguments to invoke `fn` with. - * @returns {Number} The the ID of the timeout. + * @returns {number} The the ID of the timeout. */ function setInterval(fn, delay) { return schedule(fn, delay, slice.call(arguments, 2), true); @@ -97,10 +97,10 @@ * Executes a code snippet or a function after specified delay. * * @memberOf context - * @param {Function|String} fn The function to call or string to evaluate. - * @oaram {Number} delay The number of milliseconds to delay the `fn` call. + * @param {(function|string)} fn The function to call or string to evaluate. + * @param {number} delay The number of milliseconds to delay the `fn` call. * @param [arg1, arg2, ...] Arguments to invoke `fn` with. - * @returns {Number} The the ID of the timeout. + * @returns {number} The the ID of the timeout. */ function setTimeout(fn, delay) { return schedule(fn, delay, slice.call(arguments, 2)); @@ -121,7 +121,7 @@ * A logging callback triggered when all testing is completed. * * @memberOf QUnit - * @param {Object} details An object with properties `failed`, `passed`, `runtime`, and `total`. + * @param {object} details An object with properties `failed`, `passed`, `runtime`, and `total`. */ QUnit.done(function() { var ran; @@ -160,7 +160,7 @@ * A logging callback triggered after every assertion. * * @memberOf QUnit - * @param {Object} details An object with properties `actual`, `expected`, `message`, and `result`. + * @param {object} details An object with properties `actual`, `expected`, `message`, and `result`. */ QUnit.log(function(details) { var expected = details.expected, @@ -183,7 +183,7 @@ * A logging callback triggered at the start of every test module. * * @memberOf QUnit - * @param {Object} details An object with property `name`. + * @param {object} details An object with property `name`. */ QUnit.moduleStart(function(details) { console.log(hr); @@ -195,9 +195,9 @@ * Converts an object into a string representation. * * @memberOf QUnit - * @type Function - * @param {Object} object The object to stringify. - * @returns {String} The result string. + * @type function + * @param {object} object The object to stringify. + * @returns {string} The result string. */ QUnit.jsDump.parsers.object = (function() { var func = QUnit.jsDump.parsers.object; @@ -217,7 +217,7 @@ * A logging callback triggered after a test is completed. * * @memberOf QUnit - * @param {Object} details An object with properties `failed`, `name`, `passed`, and `total`. + * @param {object} details An object with properties `failed`, `name`, `passed`, and `total`. */ QUnit.testDone(function(details) { var assertions = QUnit.config.testStats.assertions, @@ -239,7 +239,7 @@ * An object used to hold information about the current running test. * * @memberOf QUnit.config - * @type Object + * @type object */ QUnit.config.testStats = {