Update other vendors jsdoc comment blocks.

Former-commit-id: 3dcc92abe376d4c83baf6d2307c0a4343d5dce31
This commit is contained in:
John-David Dalton
2013-08-25 20:40:24 -07:00
parent a11bff0c7b
commit 72d505b2f1
3 changed files with 227 additions and 227 deletions

View File

@@ -105,8 +105,8 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @param {Object} [context=window] The context object. * @param {object} [context=window] The context object.
* @returns {Function} Returns the `Benchmark` function. * @returns {function} Returns the `Benchmark` function.
*/ */
function runInContext(context) { function runInContext(context) {
// exit early if unable to acquire lodash // exit early if unable to acquire lodash
@@ -181,7 +181,7 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @type Object * @type object
*/ */
var support = {}; var support = {};
@@ -191,7 +191,7 @@
* Detect Adobe AIR. * Detect Adobe AIR.
* *
* @memberOf Benchmark.support * @memberOf Benchmark.support
* @type Boolean * @type boolean
*/ */
support.air = isClassOf(context.runtime, 'ScriptBridgingProxyObject'); support.air = isClassOf(context.runtime, 'ScriptBridgingProxyObject');
@@ -199,7 +199,7 @@
* Detect if in a browser environment. * Detect if in a browser environment.
* *
* @memberOf Benchmark.support * @memberOf Benchmark.support
* @type Boolean * @type boolean
*/ */
support.browser = doc && isHostType(context, 'navigator') && !isHostType(context, 'phantom'); support.browser = doc && isHostType(context, 'navigator') && !isHostType(context, 'phantom');
@@ -207,7 +207,7 @@
* Detect if Java is enabled/exposed. * Detect if Java is enabled/exposed.
* *
* @memberOf Benchmark.support * @memberOf Benchmark.support
* @type Boolean * @type boolean
*/ */
support.java = isClassOf(context.java, 'JavaPackage'); support.java = isClassOf(context.java, 'JavaPackage');
@@ -215,7 +215,7 @@
* Detect if the Timers API exists. * Detect if the Timers API exists.
* *
* @memberOf Benchmark.support * @memberOf Benchmark.support
* @type Boolean * @type boolean
*/ */
support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout'); support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout');
@@ -224,7 +224,7 @@
* *
* @name decompilation * @name decompilation
* @memberOf Benchmark.support * @memberOf Benchmark.support
* @type Boolean * @type boolean
*/ */
try { try {
// Safari 2.x removes commas in object literals // Safari 2.x removes commas in object literals
@@ -245,7 +245,7 @@
* Timer object used by `clock()` and `Deferred#resolve`. * Timer object used by `clock()` and `Deferred#resolve`.
* *
* @private * @private
* @type Object * @type object
*/ */
var timer = { var timer = {
@@ -254,7 +254,7 @@
* *
* @private * @private
* @memberOf timer * @memberOf timer
* @type Function|Object * @type {(function|object)}
*/ */
'ns': Date, 'ns': Date,
@@ -263,7 +263,7 @@
* *
* @private * @private
* @memberOf timer * @memberOf timer
* @param {Object} deferred The deferred instance. * @param {object} deferred The deferred instance.
*/ */
'start': null, // lazy defined in `clock()` 'start': null, // lazy defined in `clock()`
@@ -272,7 +272,7 @@
* *
* @private * @private
* @memberOf timer * @memberOf timer
* @param {Object} deferred The deferred instance. * @param {object} deferred The deferred instance.
*/ */
'stop': null // lazy defined in `clock()` 'stop': null // lazy defined in `clock()`
}; };
@@ -283,9 +283,9 @@
* The Benchmark constructor. * The Benchmark constructor.
* *
* @constructor * @constructor
* @param {String} name A name to identify the benchmark. * @param {string} name A name to identify the benchmark.
* @param {Function|String} fn The test to benchmark. * @param {(function|string)} fn The test to benchmark.
* @param {Object} [options={}] Options object. * @param {object} [options={}] Options object.
* @example * @example
* *
* // basic usage (the `new` operator is optional) * // basic usage (the `new` operator is optional)
@@ -394,7 +394,7 @@
* *
* @constructor * @constructor
* @memberOf Benchmark * @memberOf Benchmark
* @param {Object} clone The cloned benchmark instance. * @param {object} clone The cloned benchmark instance.
*/ */
function Deferred(clone) { function Deferred(clone) {
var deferred = this; var deferred = this;
@@ -410,7 +410,7 @@
* *
* @constructor * @constructor
* @memberOf Benchmark * @memberOf Benchmark
* @param {String|Object} type The event type. * @param {(object|string)} type The event type.
*/ */
function Event(type) { function Event(type) {
var event = this; var event = this;
@@ -427,8 +427,8 @@
* *
* @constructor * @constructor
* @memberOf Benchmark * @memberOf Benchmark
* @param {String} name A name to identify the suite. * @param {string} name A name to identify the suite.
* @param {Object} [options={}] Options object. * @param {object} [options={}] Options object.
* @example * @example
* *
* // basic usage (the `new` operator is optional) * // basic usage (the `new` operator is optional)
@@ -483,8 +483,8 @@
* A deep clone utility. * A deep clone utility.
* *
* @private * @private
* @param {Mixed} value The value to clone. * @param {*} value The value to clone.
* @returns {Mixed} The cloned value. * @returns {*} The cloned value.
*/ */
var cloneDeep = _.partialRight(_.cloneDeep, function(value) { var cloneDeep = _.partialRight(_.cloneDeep, function(value) {
// do not clone non-Object objects // do not clone non-Object objects
@@ -497,9 +497,9 @@
* Creates a function from the given arguments string and body. * Creates a function from the given arguments string and body.
* *
* @private * @private
* @param {String} args The comma separated function arguments. * @param {string} args The comma separated function arguments.
* @param {String} body The function body. * @param {string} body The function body.
* @returns {Function} The new function. * @returns {function} The new function.
*/ */
function createFunction() { function createFunction() {
// lazy define // lazy define
@@ -523,8 +523,8 @@
* Delay the execution of a function based on the benchmark's `delay` property. * Delay the execution of a function based on the benchmark's `delay` property.
* *
* @private * @private
* @param {Object} bench The benchmark instance. * @param {object} bench The benchmark instance.
* @param {Object} fn The function to execute. * @param {object} fn The function to execute.
*/ */
function delay(bench, fn) { function delay(bench, fn) {
bench._timerId = _.delay(fn, bench.delay * 1e3); bench._timerId = _.delay(fn, bench.delay * 1e3);
@@ -545,8 +545,8 @@
* Gets the name of the first argument from a function's source. * Gets the name of the first argument from a function's source.
* *
* @private * @private
* @param {Function} fn The function. * @param {function} fn The function.
* @returns {String} The argument name. * @returns {string} The argument name.
*/ */
function getFirstArgument(fn) { function getFirstArgument(fn) {
return (!_.has(fn, 'toString') && return (!_.has(fn, 'toString') &&
@@ -558,8 +558,8 @@
* See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms. * See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms.
* *
* @private * @private
* @param {Array} sample The sample. * @param {array} sample The sample.
* @returns {Number} The geometric mean. * @returns {number} The geometric mean.
*/ */
function getGeometricMean(sample) { function getGeometricMean(sample) {
return pow(Math.E, _.reduce(sample, function(sum, x) { return pow(Math.E, _.reduce(sample, function(sum, x) {
@@ -571,8 +571,8 @@
* Computes the arithmetic mean of a sample. * Computes the arithmetic mean of a sample.
* *
* @private * @private
* @param {Array} sample The sample. * @param {array} sample The sample.
* @returns {Number} The mean. * @returns {number} The mean.
*/ */
function getMean(sample) { function getMean(sample) {
return (_.reduce(sample, function(sum, x) { return (_.reduce(sample, function(sum, x) {
@@ -584,9 +584,9 @@
* Gets the source code of a function. * Gets the source code of a function.
* *
* @private * @private
* @param {Function} fn The function. * @param {function} fn The function.
* @param {String} altSource A string used when a function's source code is unretrievable. * @param {string} altSource A string used when a function's source code is unretrievable.
* @returns {String} The function's source code. * @returns {string} The function's source code.
*/ */
function getSource(fn, altSource) { function getSource(fn, altSource) {
var result = altSource; var result = altSource;
@@ -609,9 +609,9 @@
* Checks if an object is of the specified class. * Checks if an object is of the specified class.
* *
* @private * @private
* @param {Mixed} value The value to check. * @param {*} value The value to check.
* @param {String} name The name of the class. * @param {string} name The name of the class.
* @returns {Boolean} Returns `true` if the value is of the specified class, else `false`. * @returns {boolean} Returns `true` if the value is of the specified class, else `false`.
*/ */
function isClassOf(value, name) { function isClassOf(value, name) {
return value != null && toString.call(value) == '[object ' + name + ']'; return value != null && toString.call(value) == '[object ' + name + ']';
@@ -623,9 +623,9 @@
* types of "object", "function", or "unknown". * types of "object", "function", or "unknown".
* *
* @private * @private
* @param {Mixed} object The owner of the property. * @param {*} object The owner of the property.
* @param {String} property The property to check. * @param {string} property The property to check.
* @returns {Boolean} Returns `true` if the property value is a non-primitive, else `false`. * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.
*/ */
function isHostType(object, property) { function isHostType(object, property) {
if (object == null) { if (object == null) {
@@ -639,8 +639,8 @@
* Checks if a value can be safely coerced to a string. * Checks if a value can be safely coerced to a string.
* *
* @private * @private
* @param {Mixed} value The value to check. * @param {*} value The value to check.
* @returns {Boolean} Returns `true` if the value can be coerced, else `false`. * @returns {boolean} Returns `true` if the value can be coerced, else `false`.
*/ */
function isStringable(value) { function isStringable(value) {
return _.has(value, 'toString') || isClassOf(value, 'String'); return _.has(value, 'toString') || isClassOf(value, 'String');
@@ -659,8 +659,8 @@
* A wrapper around require() to suppress `module missing` errors. * A wrapper around require() to suppress `module missing` errors.
* *
* @private * @private
* @param {String} id The module id. * @param {string} id The module id.
* @returns {Mixed} The exported module or `null`. * @returns {*} The exported module or `null`.
*/ */
function req(id) { function req(id) {
try { try {
@@ -673,7 +673,7 @@
* Runs a snippet of JavaScript via script injection. * Runs a snippet of JavaScript via script injection.
* *
* @private * @private
* @param {String} code The code to run. * @param {string} code The code to run.
*/ */
function runScript(code) { function runScript(code) {
var anchor = freeDefine ? define.amd : Benchmark, var anchor = freeDefine ? define.amd : Benchmark,
@@ -704,8 +704,8 @@
* A helper function for setting options/event handlers. * A helper function for setting options/event handlers.
* *
* @private * @private
* @param {Object} object The benchmark or suite instance. * @param {object} object The benchmark or suite instance.
* @param {Object} [options={}] Options object. * @param {object} [options={}] Options object.
*/ */
function setOptions(object, options) { function setOptions(object, options) {
options = _.extend({}, object.constructor.options, options); options = _.extend({}, object.constructor.options, options);
@@ -758,10 +758,10 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @param {Array} array The array to iterate over. * @param {array} array The array to iterate over.
* @param {Function|String} callback The function/alias called per iteration. * @param {(function|string)} callback The function/alias called per iteration.
* @param {Mixed} thisArg The `this` binding for the callback. * @param {*} thisArg The `this` binding for the callback.
* @returns {Array} A new array of values that passed callback filter. * @returns {array} A new array of values that passed callback filter.
* @example * @example
* *
* // get odd numbers * // get odd numbers
@@ -804,8 +804,8 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @param {Number} number The number to convert. * @param {number} number The number to convert.
* @returns {String} The more readable string representation. * @returns {string} The more readable string representation.
*/ */
function formatNumber(number) { function formatNumber(number) {
number = String(number).split('.'); number = String(number).split('.');
@@ -818,10 +818,10 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @param {Array} benches Array of benchmarks to iterate over. * @param {array} benches Array of benchmarks to iterate over.
* @param {String|Object} name The name of the method to invoke OR options object. * @param {(object|string)} name The name of the method to invoke OR options object.
* @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. * @param {...*} [arg] Arguments to invoke the method with.
* @returns {Array} A new array of values returned from each method invoked. * @returns {array} A new array of values returned from each method invoked.
* @example * @example
* *
* // invoke `reset` on all benchmarks * // invoke `reset` on all benchmarks
@@ -999,10 +999,10 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @param {Array|Object} object The object to operate on. * @param {(array|object)} object The object to operate on.
* @param {String} [separator1=','] The separator used between key-value pairs. * @param {string} [separator1=','] The separator used between key-value pairs.
* @param {String} [separator2=': '] The separator used between keys and values. * @param {string} [separator2=': '] The separator used between keys and values.
* @returns {String} The joined result. * @returns {string} The joined result.
*/ */
function join(object, separator1, separator2) { function join(object, separator1, separator2) {
var result = [], var result = [],
@@ -1023,7 +1023,7 @@
* *
* @name abort * @name abort
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @returns {Object} The suite instance. * @returns {object} The suite instance.
*/ */
function abortSuite() { function abortSuite() {
var event, var event,
@@ -1052,10 +1052,10 @@
* Adds a test to the benchmark suite. * Adds a test to the benchmark suite.
* *
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @param {String} name A name to identify the benchmark. * @param {string} name A name to identify the benchmark.
* @param {Function|String} fn The test to benchmark. * @param {(function|string)} fn The test to benchmark.
* @param {Object} [options={}] Options object. * @param {object} [options={}] Options object.
* @returns {Object} The benchmark instance. * @returns {object} The benchmark instance.
* @example * @example
* *
* // basic usage * // basic usage
@@ -1101,8 +1101,8 @@
* *
* @name clone * @name clone
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @param {Object} options Options object to overwrite cloned options. * @param {object} options Options object to overwrite cloned options.
* @returns {Object} The new suite instance. * @returns {object} The new suite instance.
*/ */
function cloneSuite(options) { function cloneSuite(options) {
var suite = this, var suite = this,
@@ -1124,8 +1124,8 @@
* *
* @name filter * @name filter
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @param {Function|String} callback The function/alias called per iteration. * @param {(function|string)} callback The function/alias called per iteration.
* @returns {Object} A new suite of benchmarks that passed callback filter. * @returns {object} A new suite of benchmarks that passed callback filter.
*/ */
function filterSuite(callback) { function filterSuite(callback) {
var suite = this, var suite = this,
@@ -1140,7 +1140,7 @@
* *
* @name reset * @name reset
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @returns {Object} The suite instance. * @returns {object} The suite instance.
*/ */
function resetSuite() { function resetSuite() {
var event, var event,
@@ -1169,8 +1169,8 @@
* *
* @name run * @name run
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @param {Object} [options={}] Options object. * @param {object} [options={}] Options object.
* @returns {Object} The suite instance. * @returns {object} The suite instance.
* @example * @example
* *
* // basic usage * // basic usage
@@ -1215,8 +1215,8 @@
* Executes all registered listeners of the specified event type. * Executes all registered listeners of the specified event type.
* *
* @memberOf Benchmark, Benchmark.Suite * @memberOf Benchmark, Benchmark.Suite
* @param {String|Object} type The event type or object. * @param {(object|string)} type The event type or object.
* @returns {Mixed} Returns the return value of the last listener executed. * @returns {*} Returns the return value of the last listener executed.
*/ */
function emit(type) { function emit(type) {
var listeners, var listeners,
@@ -1245,8 +1245,8 @@
* to add or remove listeners. * to add or remove listeners.
* *
* @memberOf Benchmark, Benchmark.Suite * @memberOf Benchmark, Benchmark.Suite
* @param {String} type The event type. * @param {string} type The event type.
* @returns {Array} The listeners array. * @returns {array} The listeners array.
*/ */
function listeners(type) { function listeners(type) {
var object = this, var object = this,
@@ -1261,9 +1261,9 @@
* or unregisters all listeners for all event types. * or unregisters all listeners for all event types.
* *
* @memberOf Benchmark, Benchmark.Suite * @memberOf Benchmark, Benchmark.Suite
* @param {String} [type] The event type. * @param {string} [type] The event type.
* @param {Function} [listener] The function to unregister. * @param {function} [listener] The function to unregister.
* @returns {Object} The benchmark instance. * @returns {object} The benchmark instance.
* @example * @example
* *
* // unregister a listener for an event type * // unregister a listener for an event type
@@ -1312,9 +1312,9 @@
* Registers a listener for the specified event type(s). * Registers a listener for the specified event type(s).
* *
* @memberOf Benchmark, Benchmark.Suite * @memberOf Benchmark, Benchmark.Suite
* @param {String} type The event type. * @param {string} type The event type.
* @param {Function} listener The function to register. * @param {function} listener The function to register.
* @returns {Object} The benchmark instance. * @returns {object} The benchmark instance.
* @example * @example
* *
* // register a listener for an event type * // register a listener for an event type
@@ -1342,7 +1342,7 @@
* Aborts the benchmark without recording times. * Aborts the benchmark without recording times.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @returns {Object} The benchmark instance. * @returns {object} The benchmark instance.
*/ */
function abort() { function abort() {
var event, var event,
@@ -1375,8 +1375,8 @@
* Creates a new benchmark using the same test and options. * Creates a new benchmark using the same test and options.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @param {Object} options Options object to overwrite cloned options. * @param {object} options Options object to overwrite cloned options.
* @returns {Object} The new benchmark instance. * @returns {object} The new benchmark instance.
* @example * @example
* *
* var bizarro = bench.clone({ * var bizarro = bench.clone({
@@ -1405,8 +1405,8 @@
* Determines if a benchmark is faster than another. * Determines if a benchmark is faster than another.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @param {Object} other The benchmark to compare. * @param {object} other The benchmark to compare.
* @returns {Number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate. * @returns {number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate.
*/ */
function compare(other) { function compare(other) {
var critical, var critical,
@@ -1459,7 +1459,7 @@
* Reset properties and abort if running. * Reset properties and abort if running.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @returns {Object} The benchmark instance. * @returns {object} The benchmark instance.
*/ */
function reset() { function reset() {
var data, var data,
@@ -1530,7 +1530,7 @@
* *
* @name toString * @name toString
* @memberOf Benchmark * @memberOf Benchmark
* @returns {String} A string representation of the benchmark instance. * @returns {string} A string representation of the benchmark instance.
*/ */
function toStringBench() { function toStringBench() {
var bench = this, var bench = this,
@@ -1557,8 +1557,8 @@
* Clocks the time taken to execute a test per cycle (secs). * Clocks the time taken to execute a test per cycle (secs).
* *
* @private * @private
* @param {Object} bench The benchmark instance. * @param {object} bench The benchmark instance.
* @returns {Number} The time taken. * @returns {number} The time taken.
*/ */
function clock() { function clock() {
var applet, var applet,
@@ -1872,8 +1872,8 @@
* Computes stats on benchmark results. * Computes stats on benchmark results.
* *
* @private * @private
* @param {Object} bench The benchmark instance. * @param {object} bench The benchmark instance.
* @param {Object} options The options object. * @param {object} options The options object.
*/ */
function compute(bench, options) { function compute(bench, options) {
options || (options = {}); options || (options = {});
@@ -2026,8 +2026,8 @@
* Cycles a benchmark until a run `count` can be established. * Cycles a benchmark until a run `count` can be established.
* *
* @private * @private
* @param {Object} clone The cloned benchmark instance. * @param {object} clone The cloned benchmark instance.
* @param {Object} options The options object. * @param {object} options The options object.
*/ */
function cycle(clone, options) { function cycle(clone, options) {
options || (options = {}); options || (options = {});
@@ -2130,8 +2130,8 @@
* Runs the benchmark. * Runs the benchmark.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @param {Object} [options={}] Options object. * @param {object} [options={}] Options object.
* @returns {Object} The benchmark instance. * @returns {object} The benchmark instance.
* @example * @example
* *
* // basic usage * // basic usage
@@ -2187,7 +2187,7 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @type Object * @type object
*/ */
'options': { 'options': {
@@ -2196,7 +2196,7 @@
* by default. * by default.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Boolean * @type boolean
*/ */
'async': false, 'async': false,
@@ -2204,14 +2204,14 @@
* A flag to indicate that the benchmark clock is deferred. * A flag to indicate that the benchmark clock is deferred.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Boolean * @type boolean
*/ */
'defer': false, 'defer': false,
/** /**
* The delay between test cycles (secs). * The delay between test cycles (secs).
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Number * @type number
*/ */
'delay': 0.005, 'delay': 0.005,
@@ -2220,7 +2220,7 @@
* (auto-generated if absent). * (auto-generated if absent).
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type String * @type string
*/ */
'id': undefined, 'id': undefined,
@@ -2228,7 +2228,7 @@
* The default number of times to execute a test on a benchmark's first cycle. * The default number of times to execute a test on a benchmark's first cycle.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Number * @type number
*/ */
'initCount': 1, 'initCount': 1,
@@ -2238,7 +2238,7 @@
* Note: Cycle delays aren't counted toward the maximum time. * Note: Cycle delays aren't counted toward the maximum time.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Number * @type number
*/ */
'maxTime': 5, 'maxTime': 5,
@@ -2246,7 +2246,7 @@
* The minimum sample size required to perform statistical analysis. * The minimum sample size required to perform statistical analysis.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Number * @type number
*/ */
'minSamples': 5, 'minSamples': 5,
@@ -2254,7 +2254,7 @@
* The time needed to reduce the percent uncertainty of measurement to 1% (secs). * The time needed to reduce the percent uncertainty of measurement to 1% (secs).
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Number * @type number
*/ */
'minTime': 0, 'minTime': 0,
@@ -2262,7 +2262,7 @@
* The name of the benchmark. * The name of the benchmark.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type String * @type string
*/ */
'name': undefined, 'name': undefined,
@@ -2270,7 +2270,7 @@
* An event listener called when the benchmark is aborted. * An event listener called when the benchmark is aborted.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Function * @type function
*/ */
'onAbort': undefined, 'onAbort': undefined,
@@ -2278,7 +2278,7 @@
* An event listener called when the benchmark completes running. * An event listener called when the benchmark completes running.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Function * @type function
*/ */
'onComplete': undefined, 'onComplete': undefined,
@@ -2286,7 +2286,7 @@
* An event listener called after each run cycle. * An event listener called after each run cycle.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Function * @type function
*/ */
'onCycle': undefined, 'onCycle': undefined,
@@ -2294,7 +2294,7 @@
* An event listener called when a test errors. * An event listener called when a test errors.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Function * @type function
*/ */
'onError': undefined, 'onError': undefined,
@@ -2302,7 +2302,7 @@
* An event listener called when the benchmark is reset. * An event listener called when the benchmark is reset.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Function * @type function
*/ */
'onReset': undefined, 'onReset': undefined,
@@ -2310,7 +2310,7 @@
* An event listener called when the benchmark starts running. * An event listener called when the benchmark starts running.
* *
* @memberOf Benchmark.options * @memberOf Benchmark.options
* @type Function * @type function
*/ */
'onStart': undefined 'onStart': undefined
}, },
@@ -2321,7 +2321,7 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @type Object * @type object
*/ */
'platform': context.platform || req('platform') || ({ 'platform': context.platform || req('platform') || ({
'description': context.navigator && context.navigator.userAgent || null, 'description': context.navigator && context.navigator.userAgent || null,
@@ -2342,7 +2342,7 @@
* *
* @static * @static
* @memberOf Benchmark * @memberOf Benchmark
* @type String * @type string
*/ */
'version': '1.0.0' 'version': '1.0.0'
}); });
@@ -2369,7 +2369,7 @@
* The number of times a test was executed. * The number of times a test was executed.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Number * @type number
*/ */
'count': 0, 'count': 0,
@@ -2377,7 +2377,7 @@
* The number of cycles performed while benchmarking. * The number of cycles performed while benchmarking.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Number * @type number
*/ */
'cycles': 0, 'cycles': 0,
@@ -2385,7 +2385,7 @@
* The number of executions per second. * The number of executions per second.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Number * @type number
*/ */
'hz': 0, 'hz': 0,
@@ -2393,7 +2393,7 @@
* The compiled test function. * The compiled test function.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Function|String * @type function|...string
*/ */
'compiled': undefined, 'compiled': undefined,
@@ -2401,7 +2401,7 @@
* The error object if the test failed. * The error object if the test failed.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Object * @type object
*/ */
'error': undefined, 'error': undefined,
@@ -2409,7 +2409,7 @@
* The test to benchmark. * The test to benchmark.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Function|String * @type function|...string
*/ */
'fn': undefined, 'fn': undefined,
@@ -2417,7 +2417,7 @@
* A flag to indicate if the benchmark is aborted. * A flag to indicate if the benchmark is aborted.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Boolean * @type boolean
*/ */
'aborted': false, 'aborted': false,
@@ -2425,7 +2425,7 @@
* A flag to indicate if the benchmark is running. * A flag to indicate if the benchmark is running.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Boolean * @type boolean
*/ */
'running': false, 'running': false,
@@ -2433,7 +2433,7 @@
* Compiled into the test and executed immediately **before** the test loop. * Compiled into the test and executed immediately **before** the test loop.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Function|String * @type function|...string
* @example * @example
* *
* // basic usage * // basic usage
@@ -2496,7 +2496,7 @@
* Compiled into the test and executed immediately **after** the test loop. * Compiled into the test and executed immediately **after** the test loop.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Function|String * @type function|...string
*/ */
'teardown': noop, 'teardown': noop,
@@ -2504,7 +2504,7 @@
* An object of stats including mean, margin or error, and standard deviation. * An object of stats including mean, margin or error, and standard deviation.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Object * @type object
*/ */
'stats': { 'stats': {
@@ -2512,7 +2512,7 @@
* The margin of error. * The margin of error.
* *
* @memberOf Benchmark#stats * @memberOf Benchmark#stats
* @type Number * @type number
*/ */
'moe': 0, 'moe': 0,
@@ -2520,7 +2520,7 @@
* The relative margin of error (expressed as a percentage of the mean). * The relative margin of error (expressed as a percentage of the mean).
* *
* @memberOf Benchmark#stats * @memberOf Benchmark#stats
* @type Number * @type number
*/ */
'rme': 0, 'rme': 0,
@@ -2528,7 +2528,7 @@
* The standard error of the mean. * The standard error of the mean.
* *
* @memberOf Benchmark#stats * @memberOf Benchmark#stats
* @type Number * @type number
*/ */
'sem': 0, 'sem': 0,
@@ -2536,7 +2536,7 @@
* The sample standard deviation. * The sample standard deviation.
* *
* @memberOf Benchmark#stats * @memberOf Benchmark#stats
* @type Number * @type number
*/ */
'deviation': 0, 'deviation': 0,
@@ -2544,7 +2544,7 @@
* The sample arithmetic mean (secs). * The sample arithmetic mean (secs).
* *
* @memberOf Benchmark#stats * @memberOf Benchmark#stats
* @type Number * @type number
*/ */
'mean': 0, 'mean': 0,
@@ -2560,7 +2560,7 @@
* The sample variance. * The sample variance.
* *
* @memberOf Benchmark#stats * @memberOf Benchmark#stats
* @type Number * @type number
*/ */
'variance': 0 'variance': 0
}, },
@@ -2569,7 +2569,7 @@
* An object of timing data including cycle, elapsed, period, start, and stop. * An object of timing data including cycle, elapsed, period, start, and stop.
* *
* @memberOf Benchmark * @memberOf Benchmark
* @type Object * @type object
*/ */
'times': { 'times': {
@@ -2577,7 +2577,7 @@
* The time taken to complete the last cycle (secs). * The time taken to complete the last cycle (secs).
* *
* @memberOf Benchmark#times * @memberOf Benchmark#times
* @type Number * @type number
*/ */
'cycle': 0, 'cycle': 0,
@@ -2585,7 +2585,7 @@
* The time taken to complete the benchmark (secs). * The time taken to complete the benchmark (secs).
* *
* @memberOf Benchmark#times * @memberOf Benchmark#times
* @type Number * @type number
*/ */
'elapsed': 0, 'elapsed': 0,
@@ -2593,7 +2593,7 @@
* The time taken to execute the test once (secs). * The time taken to execute the test once (secs).
* *
* @memberOf Benchmark#times * @memberOf Benchmark#times
* @type Number * @type number
*/ */
'period': 0, 'period': 0,
@@ -2601,7 +2601,7 @@
* A timestamp of when the benchmark started (ms). * A timestamp of when the benchmark started (ms).
* *
* @memberOf Benchmark#times * @memberOf Benchmark#times
* @type Number * @type number
*/ */
'timeStamp': 0 'timeStamp': 0
} }
@@ -2628,7 +2628,7 @@
* The deferred benchmark instance. * The deferred benchmark instance.
* *
* @memberOf Benchmark.Deferred * @memberOf Benchmark.Deferred
* @type Object * @type object
*/ */
'benchmark': null, 'benchmark': null,
@@ -2636,7 +2636,7 @@
* The number of deferred cycles performed while benchmarking. * The number of deferred cycles performed while benchmarking.
* *
* @memberOf Benchmark.Deferred * @memberOf Benchmark.Deferred
* @type Number * @type number
*/ */
'cycles': 0, 'cycles': 0,
@@ -2644,7 +2644,7 @@
* The time taken to complete the deferred benchmark (secs). * The time taken to complete the deferred benchmark (secs).
* *
* @memberOf Benchmark.Deferred * @memberOf Benchmark.Deferred
* @type Number * @type number
*/ */
'elapsed': 0, 'elapsed': 0,
@@ -2652,7 +2652,7 @@
* A timestamp of when the deferred benchmark started (ms). * A timestamp of when the deferred benchmark started (ms).
* *
* @memberOf Benchmark.Deferred * @memberOf Benchmark.Deferred
* @type Number * @type number
*/ */
'timeStamp': 0 'timeStamp': 0
}); });
@@ -2669,7 +2669,7 @@
* A flag to indicate if the emitters listener iteration is aborted. * A flag to indicate if the emitters listener iteration is aborted.
* *
* @memberOf Benchmark.Event * @memberOf Benchmark.Event
* @type Boolean * @type boolean
*/ */
'aborted': false, 'aborted': false,
@@ -2677,7 +2677,7 @@
* A flag to indicate if the default action is cancelled. * A flag to indicate if the default action is cancelled.
* *
* @memberOf Benchmark.Event * @memberOf Benchmark.Event
* @type Boolean * @type boolean
*/ */
'cancelled': false, 'cancelled': false,
@@ -2685,7 +2685,7 @@
* The object whose listeners are currently being processed. * The object whose listeners are currently being processed.
* *
* @memberOf Benchmark.Event * @memberOf Benchmark.Event
* @type Object * @type object
*/ */
'currentTarget': undefined, 'currentTarget': undefined,
@@ -2701,7 +2701,7 @@
* The object to which the event was originally emitted. * The object to which the event was originally emitted.
* *
* @memberOf Benchmark.Event * @memberOf Benchmark.Event
* @type Object * @type object
*/ */
'target': undefined, 'target': undefined,
@@ -2709,7 +2709,7 @@
* A timestamp of when the event was created (ms). * A timestamp of when the event was created (ms).
* *
* @memberOf Benchmark.Event * @memberOf Benchmark.Event
* @type Number * @type number
*/ */
'timeStamp': 0, 'timeStamp': 0,
@@ -2717,7 +2717,7 @@
* The event type. * The event type.
* *
* @memberOf Benchmark.Event * @memberOf Benchmark.Event
* @type String * @type string
*/ */
'type': '' 'type': ''
}); });
@@ -2729,7 +2729,7 @@
* *
* @static * @static
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @type Object * @type object
*/ */
Suite.options = { Suite.options = {
@@ -2737,7 +2737,7 @@
* The name of the suite. * The name of the suite.
* *
* @memberOf Benchmark.Suite.options * @memberOf Benchmark.Suite.options
* @type String * @type string
*/ */
'name': undefined 'name': undefined
}; };
@@ -2750,7 +2750,7 @@
* The number of benchmarks in the suite. * The number of benchmarks in the suite.
* *
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @type Number * @type number
*/ */
'length': 0, 'length': 0,
@@ -2758,7 +2758,7 @@
* A flag to indicate if the suite is aborted. * A flag to indicate if the suite is aborted.
* *
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @type Boolean * @type boolean
*/ */
'aborted': false, 'aborted': false,
@@ -2766,7 +2766,7 @@
* A flag to indicate if the suite is running. * A flag to indicate if the suite is running.
* *
* @memberOf Benchmark.Suite * @memberOf Benchmark.Suite
* @type Boolean * @type boolean
*/ */
'running': false 'running': false
}); });

View File

@@ -65,8 +65,8 @@
* Capitalizes a string value. * Capitalizes a string value.
* *
* @private * @private
* @param {String} string The string to capitalize. * @param {string} string The string to capitalize.
* @returns {String} The capitalized string. * @returns {string} The capitalized string.
*/ */
function capitalize(string) { function capitalize(string) {
string = String(string); string = String(string);
@@ -77,8 +77,8 @@
* An iteration utility for arrays and objects. * An iteration utility for arrays and objects.
* *
* @private * @private
* @param {Array|Object} object The object to iterate over. * @param {(array|object)} object The object to iterate over.
* @param {Function} callback The function called per iteration. * @param {function} callback The function called per iteration.
*/ */
function each(object, callback) { function each(object, callback) {
var index = -1, var index = -1,
@@ -97,8 +97,8 @@
* Trim and conditionally capitalize string values. * Trim and conditionally capitalize string values.
* *
* @private * @private
* @param {String} string The string to format. * @param {string} string The string to format.
* @returns {String} The formatted string. * @returns {string} The formatted string.
*/ */
function format(string) { function format(string) {
string = trim(string); string = trim(string);
@@ -111,8 +111,8 @@
* Iterates over an object's own properties, executing the `callback` for each. * Iterates over an object's own properties, executing the `callback` for each.
* *
* @private * @private
* @param {Object} object The object to iterate over. * @param {object} object The object to iterate over.
* @param {Function} callback The function executed per own property. * @param {function} callback The function executed per own property.
*/ */
function forOwn(object, callback) { function forOwn(object, callback) {
for (var key in object) { for (var key in object) {
@@ -124,8 +124,8 @@
* Gets the internal [[Class]] of a value. * Gets the internal [[Class]] of a value.
* *
* @private * @private
* @param {Mixed} value The value. * @param {*} value The value.
* @returns {String} The [[Class]]. * @returns {string} The [[Class]].
*/ */
function getClassOf(value) { function getClassOf(value) {
return value == null return value == null
@@ -137,9 +137,9 @@
* Checks if an object has the specified key as a direct property. * Checks if an object has the specified key as a direct property.
* *
* @private * @private
* @param {Object} object The object to check. * @param {object} object The object to check.
* @param {String} key The key to check for. * @param {string} key The key to check for.
* @returns {Boolean} Returns `true` if key is a direct property, else `false`. * @returns {boolean} Returns `true` if key is a direct property, else `false`.
*/ */
function hasKey() { function hasKey() {
// lazy define for others (not as accurate) // lazy define for others (not as accurate)
@@ -173,9 +173,9 @@
* types of object, function, or unknown. * types of object, function, or unknown.
* *
* @private * @private
* @param {Mixed} object The owner of the property. * @param {*} object The owner of the property.
* @param {String} property The property to check. * @param {string} property The property to check.
* @returns {Boolean} Returns `true` if the property value is a non-primitive, else `false`. * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.
*/ */
function isHostType(object, property) { function isHostType(object, property) {
var type = object != null ? typeof object[property] : 'number'; var type = object != null ? typeof object[property] : 'number';
@@ -188,8 +188,8 @@
* spaces optional. * spaces optional.
* *
* @private * @private
* @param {String} string The string to qualify. * @param {string} string The string to qualify.
* @returns {String} The qualified string. * @returns {string} The qualified string.
*/ */
function qualify(string) { function qualify(string) {
return String(string).replace(/([ -])(?!$)/g, '$1?'); return String(string).replace(/([ -])(?!$)/g, '$1?');
@@ -199,10 +199,10 @@
* A bare-bones` Array#reduce` like utility function. * A bare-bones` Array#reduce` like utility function.
* *
* @private * @private
* @param {Array} array The array to iterate over. * @param {array} array The array to iterate over.
* @param {Function} callback The function called per iteration. * @param {function} callback The function called per iteration.
* @param {Mixed} accumulator Initial value of the accumulator. * @param {*} accumulator Initial value of the accumulator.
* @returns {Mixed} The accumulator. * @returns {*} The accumulator.
*/ */
function reduce(array, callback) { function reduce(array, callback) {
var accumulator = null; var accumulator = null;
@@ -216,8 +216,8 @@
* Removes leading and trailing whitespace from a string. * Removes leading and trailing whitespace from a string.
* *
* @private * @private
* @param {String} string The string to trim. * @param {string} string The string to trim.
* @returns {String} The trimmed string. * @returns {string} The trimmed string.
*/ */
function trim(string) { function trim(string) {
return String(string).replace(/^ +| +$/g, ''); return String(string).replace(/^ +| +$/g, '');
@@ -229,8 +229,8 @@
* Creates a new platform object. * Creates a new platform object.
* *
* @memberOf platform * @memberOf platform
* @param {String} [ua = navigator.userAgent] The user agent string. * @param {string} [ua = navigator.userAgent] The user agent string.
* @returns {Object} A platform object. * @returns {object} A platform object.
*/ */
function parse(ua) { function parse(ua) {
@@ -377,8 +377,8 @@
* Picks the layout engine from an array of guesses. * Picks the layout engine from an array of guesses.
* *
* @private * @private
* @param {Array} guesses An array of guesses. * @param {array} guesses An array of guesses.
* @returns {String|Null} The detected layout engine. * @returns {(null|string)} The detected layout engine.
*/ */
function getLayout(guesses) { function getLayout(guesses) {
return reduce(guesses, function(result, guess) { return reduce(guesses, function(result, guess) {
@@ -392,8 +392,8 @@
* Picks the manufacturer from an array of guesses. * Picks the manufacturer from an array of guesses.
* *
* @private * @private
* @param {Array} guesses An array of guesses. * @param {array} guesses An array of guesses.
* @returns {String|Null} The detected manufacturer. * @returns {(null|string)} The detected manufacturer.
*/ */
function getManufacturer(guesses) { function getManufacturer(guesses) {
return reduce(guesses, function(result, value, key) { return reduce(guesses, function(result, value, key) {
@@ -410,8 +410,8 @@
* Picks the browser name from an array of guesses. * Picks the browser name from an array of guesses.
* *
* @private * @private
* @param {Array} guesses An array of guesses. * @param {array} guesses An array of guesses.
* @returns {String|Null} The detected browser name. * @returns {(null|string)} The detected browser name.
*/ */
function getName(guesses) { function getName(guesses) {
return reduce(guesses, function(result, guess) { return reduce(guesses, function(result, guess) {
@@ -425,8 +425,8 @@
* Picks the OS name from an array of guesses. * Picks the OS name from an array of guesses.
* *
* @private * @private
* @param {Array} guesses An array of guesses. * @param {array} guesses An array of guesses.
* @returns {String|Null} The detected OS name. * @returns {(null|string)} The detected OS name.
*/ */
function getOS(guesses) { function getOS(guesses) {
return reduce(guesses, function(result, guess) { return reduce(guesses, function(result, guess) {
@@ -475,8 +475,8 @@
* Picks the product name from an array of guesses. * Picks the product name from an array of guesses.
* *
* @private * @private
* @param {Array} guesses An array of guesses. * @param {array} guesses An array of guesses.
* @returns {String|Null} The detected product name. * @returns {(null|string)} The detected product name.
*/ */
function getProduct(guesses) { function getProduct(guesses) {
return reduce(guesses, function(result, guess) { return reduce(guesses, function(result, guess) {
@@ -504,8 +504,8 @@
* Resolves the version using an array of UA patterns. * Resolves the version using an array of UA patterns.
* *
* @private * @private
* @param {Array} patterns An array of UA patterns. * @param {array} patterns An array of UA patterns.
* @returns {String|Null} The detected version. * @returns {(null|string)} The detected version.
*/ */
function getVersion(patterns) { function getVersion(patterns) {
return reduce(patterns, function(result, pattern) { return reduce(patterns, function(result, pattern) {
@@ -521,7 +521,7 @@
* *
* @name toString * @name toString
* @memberOf platform * @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() { function toStringPlatform() {
return this.description || ''; return this.description || '';
@@ -862,7 +862,7 @@
* The platform object. * The platform object.
* *
* @name platform * @name platform
* @type Object * @type object
*/ */
return { return {
@@ -870,7 +870,7 @@
* The browser/environment version. * The browser/environment version.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'version': name && version && (description.unshift(version), version), 'version': name && version && (description.unshift(version), version),
@@ -878,7 +878,7 @@
* The name of the browser/environment. * The name of the browser/environment.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'name': name && (description.unshift(name), name), 'name': name && (description.unshift(name), name),
@@ -886,7 +886,7 @@
* The name of the operating system. * The name of the operating system.
* *
* @memberOf platform * @memberOf platform
* @type Object * @type object
*/ */
'os': os 'os': os
? (name && ? (name &&
@@ -898,7 +898,7 @@
* The CPU architecture the OS is built for. * The CPU architecture the OS is built for.
* *
* @memberOf platform.os * @memberOf platform.os
* @type Number|Null * @type number|Null
*/ */
'architecture': null, 'architecture': null,
@@ -906,7 +906,7 @@
* The family of the OS. * The family of the OS.
* *
* @memberOf platform.os * @memberOf platform.os
* @type String|Null * @type string|Null
*/ */
'family': null, 'family': null,
@@ -914,7 +914,7 @@
* The version of the OS. * The version of the OS.
* *
* @memberOf platform.os * @memberOf platform.os
* @type String|Null * @type string|Null
*/ */
'version': null, 'version': null,
@@ -922,7 +922,7 @@
* Returns the OS string. * Returns the OS string.
* *
* @memberOf platform.os * @memberOf platform.os
* @returns {String} The OS string. * @returns {string} The OS string.
*/ */
'toString': function() { return 'null'; } 'toString': function() { return 'null'; }
}, },
@@ -931,7 +931,7 @@
* The platform description. * The platform description.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'description': description.length ? description.join(' ') : ua, 'description': description.length ? description.join(' ') : ua,
@@ -939,7 +939,7 @@
* The name of the browser layout engine. * The name of the browser layout engine.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'layout': layout && layout[0], 'layout': layout && layout[0],
@@ -947,7 +947,7 @@
* The name of the product's manufacturer. * The name of the product's manufacturer.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'manufacturer': manufacturer, 'manufacturer': manufacturer,
@@ -955,7 +955,7 @@
* The alpha/beta release indicator. * The alpha/beta release indicator.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'prerelease': prerelease, 'prerelease': prerelease,
@@ -963,7 +963,7 @@
* The name of the product hosting the browser. * The name of the product hosting the browser.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'product': product, 'product': product,
@@ -971,7 +971,7 @@
* The browser's user agent string. * The browser's user agent string.
* *
* @memberOf platform * @memberOf platform
* @type String|Null * @type string|Null
*/ */
'ua': ua, 'ua': ua,

View File

@@ -22,7 +22,7 @@
* Installs the CLI boilerplate additions on the given `context` object. * Installs the CLI boilerplate additions on the given `context` object.
* *
* @memberOf exports * @memberOf exports
* @param {Object} context The context object. * @param {object} context The context object.
*/ */
function runInContext(context) { function runInContext(context) {
// exit early if no `context` is provided or if `QUnit` does not exist // exit early if no `context` is provided or if `QUnit` does not exist
@@ -34,11 +34,11 @@
* Schedules timer-based callbacks. * Schedules timer-based callbacks.
* *
* @private * @private
* @param {Function|String} fn The function to call. * @param {(function|string)} fn The function to call.
* @oaram {Number} delay The number of milliseconds to delay the `fn` call. * @param {number} delay The number of milliseconds to delay the `fn` call.
* @param [arg1, arg2, ...] Arguments to invoke `fn` with. * @param [arg1, arg2, ...] Arguments to invoke `fn` with.
* @param {Boolean} repeated A flag to specify whether `fn` is called repeatedly. * @param {boolean} repeated A flag to specify whether `fn` is called repeatedly.
* @returns {Number} The the ID of the timeout. * @returns {number} The the ID of the timeout.
*/ */
function schedule(fn, delay, args, repeated) { function schedule(fn, delay, args, repeated) {
// Rhino 1.7RC4 will error assigning `task` below // Rhino 1.7RC4 will error assigning `task` below
@@ -70,7 +70,7 @@
* Clears the delay set by `setInterval` or `setTimeout`. * Clears the delay set by `setInterval` or `setTimeout`.
* *
* @memberOf context * @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) { function clearTimer(id) {
if (ids[id]) { if (ids[id]) {
@@ -84,10 +84,10 @@
* Executes a code snippet or function repeatedly, with a delay between each call. * Executes a code snippet or function repeatedly, with a delay between each call.
* *
* @memberOf context * @memberOf context
* @param {Function|String} fn The function to call or string to evaluate. * @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 {number} delay The number of milliseconds to delay each `fn` call.
* @param [arg1, arg2, ...] Arguments to invoke `fn` with. * @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) { function setInterval(fn, delay) {
return schedule(fn, delay, slice.call(arguments, 2), true); return schedule(fn, delay, slice.call(arguments, 2), true);
@@ -97,10 +97,10 @@
* Executes a code snippet or a function after specified delay. * Executes a code snippet or a function after specified delay.
* *
* @memberOf context * @memberOf context
* @param {Function|String} fn The function to call or string to evaluate. * @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 {number} delay The number of milliseconds to delay the `fn` call.
* @param [arg1, arg2, ...] Arguments to invoke `fn` with. * @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) { function setTimeout(fn, delay) {
return schedule(fn, delay, slice.call(arguments, 2)); return schedule(fn, delay, slice.call(arguments, 2));
@@ -121,7 +121,7 @@
* A logging callback triggered when all testing is completed. * A logging callback triggered when all testing is completed.
* *
* @memberOf QUnit * @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() { QUnit.done(function() {
var ran; var ran;
@@ -160,7 +160,7 @@
* A logging callback triggered after every assertion. * A logging callback triggered after every assertion.
* *
* @memberOf QUnit * @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) { QUnit.log(function(details) {
var expected = details.expected, var expected = details.expected,
@@ -183,7 +183,7 @@
* A logging callback triggered at the start of every test module. * A logging callback triggered at the start of every test module.
* *
* @memberOf QUnit * @memberOf QUnit
* @param {Object} details An object with property `name`. * @param {object} details An object with property `name`.
*/ */
QUnit.moduleStart(function(details) { QUnit.moduleStart(function(details) {
console.log(hr); console.log(hr);
@@ -195,9 +195,9 @@
* Converts an object into a string representation. * Converts an object into a string representation.
* *
* @memberOf QUnit * @memberOf QUnit
* @type Function * @type function
* @param {Object} object The object to stringify. * @param {object} object The object to stringify.
* @returns {String} The result string. * @returns {string} The result string.
*/ */
QUnit.jsDump.parsers.object = (function() { QUnit.jsDump.parsers.object = (function() {
var func = QUnit.jsDump.parsers.object; var func = QUnit.jsDump.parsers.object;
@@ -217,7 +217,7 @@
* A logging callback triggered after a test is completed. * A logging callback triggered after a test is completed.
* *
* @memberOf QUnit * @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) { QUnit.testDone(function(details) {
var assertions = QUnit.config.testStats.assertions, var assertions = QUnit.config.testStats.assertions,
@@ -239,7 +239,7 @@
* An object used to hold information about the current running test. * An object used to hold information about the current running test.
* *
* @memberOf QUnit.config * @memberOf QUnit.config
* @type Object * @type object
*/ */
QUnit.config.testStats = { QUnit.config.testStats = {