Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

spotlight: Cleanup repo, update submodules, and add strict mode direc…

…tive. [jddalton]
  • Loading branch information...
commit cf9457cc6e91c60ac017b04a49c9ff32ca8caf5e 1 parent 0f8fc7d
John-David Dalton jdalton authored
6 .gitmodules
View
@@ -4,9 +4,9 @@
[submodule "vendor/qunit"]
path = vendor/qunit
url = git://github.com/jquery/qunit.git
-[submodule "vendor/requirejs"]
- path = vendor/requirejs
- url = git://github.com/jrburke/requirejs.git
[submodule "vendor/qunit-clib"]
path = vendor/qunit-clib
url = git://github.com/jdalton/qunit-clib.git
+[submodule "vendor/requirejs"]
+ path = vendor/requirejs
+ url = git://github.com/jrburke/requirejs.git
14 doc/README.md
View
@@ -29,7 +29,7 @@
<!-- div -->
-### <a id="spotlight" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L664" title="View in source">`spotlight`</a>
+### <a id="spotlight" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L681" title="View in source">`spotlight`</a>
*(Object)*: The primary namespace.
[&#9650;][1]
@@ -38,7 +38,7 @@
<!-- div -->
-### <a id="spotlight.debug" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L671" title="View in source">`spotlight.debug`</a>
+### <a id="spotlight.debug" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L689" title="View in source">`spotlight.debug`</a>
*(Boolean)*: A flag to indicate that methods will execute in debug mode.
[&#9650;][1]
@@ -47,7 +47,7 @@
<!-- div -->
-### <a id="spotlight.version" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L679" title="View in source">`spotlight.version`</a>
+### <a id="spotlight.version" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L698" title="View in source">`spotlight.version`</a>
*(String)*: The semantic version number.
[&#9650;][1]
@@ -56,7 +56,7 @@
<!-- div -->
-### <a id="spotlight.byKind" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L596" title="View in source">`spotlight.byKind(kind [, options={}])`</a>
+### <a id="spotlight.byKind" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L609" title="View in source">`spotlight.byKind(kind [, options={}])`</a>
Crawls environment objects logging all object properties whose values are of a specified constructor instance, [[Class]], or type.
[&#9650;][1]
@@ -84,7 +84,7 @@ spotlight.byKind('constructor');
<!-- div -->
-### <a id="spotlight.byName" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L617" title="View in source">`spotlight.byName(name [, options={}])`</a>
+### <a id="spotlight.byName" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L631" title="View in source">`spotlight.byName(name [, options={}])`</a>
Crawls environment objects logging all object properties of the specified name.
[&#9650;][1]
@@ -110,7 +110,7 @@ spotlight.byName('map', { 'object': jQuery, 'path': '$' });
<!-- div -->
-### <a id="spotlight.byValue" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L635" title="View in source">`spotlight.byValue(value [, options={}])`</a>
+### <a id="spotlight.byValue" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L650" title="View in source">`spotlight.byValue(value [, options={}])`</a>
Crawls environment objects logging all object properties whose values are a strict match for the specified value.
[&#9650;][1]
@@ -132,7 +132,7 @@ spotlight.byValue(0);
<!-- div -->
-### <a id="spotlight.custom" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L654" title="View in source">`spotlight.custom(callback [, options={}])`</a>
+### <a id="spotlight.custom" href="https://github.com/bestiejs/spotlight/blob/master/spotlight.js#L670" title="View in source">`spotlight.custom(callback [, options={}])`</a>
Crawls environment objects executing `callback`, passing the current `value`, `key`, and `object` as arguments, against each object encountered and logs properties for which `callback` returns true.
[&#9650;][1]
21 spotlight.js
View
@@ -6,6 +6,7 @@
* Both available under MIT license <http://mths.be/mit>
*/
;(function(window, undefined) {
+ 'use strict';
/** Backup possible window/global object */
var oldWin = window;
@@ -91,6 +92,7 @@
/**
* Returns the first array value for which `callback` returns true.
+ *
* @private
* @param {Array} array The array to search.
* @param {Function} callback A function executed per array value .
@@ -108,6 +110,7 @@
/**
* Iterates over an object's own properties, executing the `callback` for each.
* Callbacks may terminate the loop by explicitly returning `false`.
+ *
* @private
* @param {Object} object The object to iterate over.
* @param {Function} callback A function executed per own property.
@@ -264,6 +267,7 @@
* Mimics ES 5.1's `Object.prototype.toString` behavior by returning the
* value's [[Class]], "Null" or "Undefined" as well as other non-spec'ed results
* like "Constructor" and "Global" .
+ *
* @private
* @param {Mixed} value The value to check.
* @returns {String} Returns a string representing the kind of `value`.
@@ -297,6 +301,7 @@
/**
* 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.
@@ -342,6 +347,7 @@
/**
* Checks if a value is an `arguments` object.
+ *
* @private
* @param {Mixed} value The value to check.
* @returns {Boolean} Returns `true` if the value is an `arguments` object, else `false`.
@@ -361,6 +367,7 @@
/**
* Checks if the specified `value` is a function.
+ *
* @private
* @param {Mixed} value The value to check.
* @returns {Boolean} Returns `true` if `value` is a function, else `false`.
@@ -373,6 +380,7 @@
* Host objects can return type values that are different from their actual
* data type. The objects we are concerned with usually return non-primitive
* types of object, function, or unknown.
+ *
* @private
* @param {Mixed} object The owner of the property.
* @param {String} property The property to check.
@@ -386,6 +394,7 @@
/**
* Checks if the specified `value` is an Object object.
+ *
* @private
* @param {Mixed} value The value to check.
* @returns {Boolean} Returns `true` if `value` is an object, else `false`.
@@ -414,6 +423,7 @@
/**
* Performs argument type checks and calls `crawl()` with specified arguments.
+ *
* @private
* @param {String} name The name of the filter function passed.
* @param {String} expected The data type expected of the given value.
@@ -431,6 +441,7 @@
/**
* Crawls environment objects logging all properties that pass the callback filter.
+ *
* @private
* @param {Function|String} callback A function executed per object encountered.
* @param {Mixed} callbackArg An argument passed to the callback.
@@ -517,6 +528,7 @@
/**
* Logs a message to the console.
+ *
* @private
* @param {String} type The log type, either "text" or "error".
* @param {String} message The log message.
@@ -576,6 +588,7 @@
/**
* Crawls environment objects logging all object properties whose values
* are of a specified constructor instance, [[Class]], or type.
+ *
* @memberOf spotlight
* @param {Function|String} kind The constructor, [[Class]], or type to check against.
* @param {Object} [options={}] The options object.
@@ -599,6 +612,7 @@
/**
* Crawls environment objects logging all object properties of the specified name.
+ *
* @memberOf spotlight
* @param {String} name The property name to search for.
* @param {Object} [options={}] The options object.
@@ -621,6 +635,7 @@
/**
* Crawls environment objects logging all object properties whose values are
* a strict match for the specified value.
+ *
* @memberOf spotlight
* @param {Mixed} value The value to search for.
* @param {Object} [options={}] The options object.
@@ -640,6 +655,7 @@
* Crawls environment objects executing `callback`, passing the current
* `value`, `key`, and `object` as arguments, against each object encountered
* and logs properties for which `callback` returns true.
+ *
* @memberOf spotlight
* @param {Function} callback A function executed per object.
* @param {Object} [options={}] The options object.
@@ -659,12 +675,14 @@
/**
* The primary namespace.
+ *
* @type Object
*/
var spotlight = {
/**
* A flag to indicate that methods will execute in debug mode.
+ *
* @memberOf spotlight
* @type Boolean
*/
@@ -672,6 +690,7 @@
/**
* The semantic version number.
+ *
* @static
* @memberOf spotlight
* @type String
@@ -732,4 +751,4 @@
// http://code.google.com/closure/compiler/docs/api-tutorial3.html#export
window['spotlight'] = spotlight;
}
-}(this));
+}(this));
5 test/test.js
View
@@ -27,7 +27,9 @@
/*--------------------------------------------------------------------------*/
/**
- * Simplifies the debug return values of `spotlight` methods by filtering non-log messages.
+ * Simplifies the debug return values of `spotlight` methods by filtering
+ * non-log messages.
+ *
* @private
* @param {Array} result The result of a `spotlight` method.
* @returns {Array} The filtered result.
@@ -42,6 +44,7 @@
/**
* Skips a given number of tests with a passing result.
+ *
* @private
* @param {Number} count The number of tests to skip.
*/
2  vendor/docdown
@@ -1 +1 @@
-Subproject commit a4bf91e692e5bce0f061bc0d22234688a3a1df11
+Subproject commit c391dcd414c43fca975cb0c08b881a18da8696e2
2  vendor/qunit-clib
@@ -1 +1 @@
-Subproject commit 99e4204676b40db82b5d8e129dd3bf704e084a8c
+Subproject commit 2cbea610427a70450ee8d2bfbb7c0dd72fe46f0e
Please sign in to comment.
Something went wrong with that request. Please try again.