Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Bump to v1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jan 26, 2016
1 parent 9842181 commit 7a1ebd1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 60 deletions.
13 changes: 4 additions & 9 deletions README.md
@@ -1,25 +1,23 @@
# Spotlight.js v1.1.0
# Spotlight.js v1.2.0

An object crawler/property search library that works on nearly all JavaScript platforms.

## Documentation

* [doc/README.md](https://github.com/bestiejs/spotlight.js/blob/master/doc/README.md#readme)
* [wiki/Roadmap](https://github.com/bestiejs/spotlight.js/wiki/Roadmap)
* [API Documentation](https://github.com/bestiejs/spotlight.js/blob/1.2.0/doc/README.md)
* [Roadmap](https://github.com/bestiejs/spotlight.js/wiki/Roadmap)

## Installation

Spotlight.js’ only hard dependency is [lodash](https://lodash.com/).

In a browser:

```html
<script src="lodash.js"></script>
<script src="spotlight.js"></script>
```

In an AMD loader:

```js
require({
'paths': {
Expand All @@ -31,19 +29,16 @@ require({
```

Using npm:

```bash
$ npm i --save spotlight
```

In Node.js:

```js
var spotlight = require('spotlight');
```

Usage example:

```js
// find all "length" properties
spotlight.byName('length');
Expand Down Expand Up @@ -78,7 +73,7 @@ spotlight.custom(function(value) { return !value; });

## Support

Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, & PhantomJS 1.9.8.
Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10, 0.12, 4, & 5, & PhantomJS 1.9.8.

## BestieJS

Expand Down
85 changes: 37 additions & 48 deletions doc/README.md
@@ -1,28 +1,24 @@
# Spotlight.js <sup>v1.1.0</sup>

<!-- div -->
# Spotlight.js <sup>v1.2.0</sup>

<!-- div class="toc-container" -->

<!-- div -->

## <a id="spotlight"></a>`spotlight`
* [`spotlight`](#spotlight)
* <a href="#spotlightversion">`spotlight.version`</a>
## `spotlight`
* <a href="#spotlight">`spotlight`</a>
* <a href="#spotlightbykindkind-options">`spotlight.byKind`</a>
* <a href="#spotlightbynamename-options">`spotlight.byName`</a>
* <a href="#spotlightbyvaluevalue-options">`spotlight.byValue`</a>
* <a href="#spotlightcustomcallback-options">`spotlight.custom`</a>
* <a href="#spotlightdebugvalue">`spotlight.debug`</a>
* <a href="#spotlightrunincontextcontextroot">`spotlight.runInContext`</a>
* <a href="#spotlightversion">`spotlight.version`</a>

<!-- /div -->


<!-- /div -->


<!-- div -->

<!-- div class="doc-container" -->

<!-- div -->

Expand All @@ -31,33 +27,21 @@
<!-- div -->

### <a id="spotlight"></a>`spotlight`
<a href="#spotlight">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L615 "View in source") [&#x24C9;][1]

*(Object)*: The primary namespace.

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightversion"></a>`spotlight.version`
<a href="#spotlightversion">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L624 "View in source") [&#x24C9;][1]
<a href="#spotlight">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L616 "View in source") [&#x24C9;][1]

*(string)*: The semantic version number.
(Object): The primary namespace.

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightbykindkind-options"></a>`spotlight.byKind(kind, [options={}])`
<a href="#spotlightbykindkind-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L523 "View in source") [&#x24C9;][1]
<a href="#spotlightbykindkind-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L524 "View in source") [&#x24C9;][1]

Crawls environment objects logging all object properties whose values are of a specified constructor instance, `[[Class]]`, or type.
Crawls environment objects logging all object properties whose values
are of a specified constructor instance, `[[Class]]`, or type.

#### Arguments
1. `kind` *(Function|string)*: The constructor, `[[Class]]`, or type to check against.
Expand All @@ -77,16 +61,14 @@ spotlight.byKind('undefined');
// or special kind "constructor"
spotlight.byKind('constructor');
```

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightbynamename-options"></a>`spotlight.byName(name, [options={}])`
<a href="#spotlightbynamename-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L545 "View in source") [&#x24C9;][1]
<a href="#spotlightbynamename-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L546 "View in source") [&#x24C9;][1]

Crawls environment objects logging all object properties of the specified name.

Expand All @@ -106,19 +88,22 @@ spotlight.byName('map', { 'object': jQuery, 'path': '$' });
// => $.map -> (function) function(a,b,c){...}
// => $.fn.map -> (function) function(a){...}
```

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightbyvaluevalue-options"></a>`spotlight.byValue(value, [options={}])`
<a href="#spotlightbyvaluevalue-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L568 "View in source") [&#x24C9;][1]
<a href="#spotlightbyvaluevalue-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L569 "View in source") [&#x24C9;][1]

Crawls environment objects logging all object properties whose values are a match for the specified value, using `SameValueZero` for equality comparisons.
&#42;Note:&#42;&#42; `SameValueZero` is like strict equality, e.g. `===`, except that `NaN` matches `NaN`. See the &#91;ES6 spec&#93;(https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) for more details.
Crawls environment objects logging all object properties whose values are
a match for the specified value, using `SameValueZero` for equality comparisons.
<br>
<br>
**Note:** `SameValueZero` is like strict equality, e.g. `===`, except that
`NaN` matches `NaN`. See the [ES6 spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
for more details.

#### Arguments
1. `value` *(&#42;)*: The value to search for.
Expand All @@ -132,18 +117,18 @@ spotlight.byValue(0);
// => window.screenX -> (number) 0
// => window.length -> (number) 0
```

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightcustomcallback-options"></a>`spotlight.custom(callback, [options={}])`
<a href="#spotlightcustomcallback-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L588 "View in source") [&#x24C9;][1]
<a href="#spotlightcustomcallback-options">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L589 "View in source") [&#x24C9;][1]

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.
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.

#### Arguments
1. `callback` *(Function)*: A function executed per object.
Expand All @@ -157,16 +142,14 @@ spotlight.custom(function(value, key) { return key.indexOf('oo') > -1; });
// or filter by falsey values
spotlight.custom(function(value) { return !value; });
```

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightdebugvalue"></a>`spotlight.debug(value)`
<a href="#spotlightdebugvalue">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L603 "View in source") [&#x24C9;][1]
<a href="#spotlightdebugvalue">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L604 "View in source") [&#x24C9;][1]

This function enables or disables debug mode for all `spotlight` methods.

Expand All @@ -179,34 +162,40 @@ spotlight.debug(true);
spotlight.byName('length');
// => [['window.length -> (number)', 0]]
```

* * *

<!-- /div -->


<!-- div -->

### <a id="spotlightrunincontextcontextroot"></a>`spotlight.runInContext([context=root])`
<a href="#spotlightrunincontextcontextroot">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/master/spotlight.js#L76 "View in source") [&#x24C9;][1]
<a href="#spotlightrunincontextcontextroot">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L76 "View in source") [&#x24C9;][1]

Create a new `spotlight` object using the given `context` object.

#### Arguments
1. `[context=root]` *(Object)*: The context object.

#### Returns
*(Object)*: Returns a new `spotlight` object.
*(Object)*: Returns a new `spotlight` object.

* * *

<!-- /div -->

<!-- div -->

<!-- /div -->
### <a id="spotlightversion"></a>`spotlight.version`
<a href="#spotlightversion">#</a> [&#x24C8;](https://github.com/bestiejs/spotlight.js/blob/1.2.0/spotlight.js#L625 "View in source") [&#x24C9;][1]

(string): The semantic version number.

* * *

<!-- /div -->

<!-- /div -->

<!-- /div -->

[1]: #spotlight "Jump back to the TOC."
[1]: #spotlight "Jump back to the TOC."
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "spotlight",
"version": "1.1.0",
"version": "1.2.0",
"description": "An object crawler/property search library that works on nearly all JavaScript platforms.",
"license": "MIT",
"main": "spotlight.js",
Expand Down
4 changes: 2 additions & 2 deletions spotlight.js
@@ -1,5 +1,5 @@
/*!
* Spotlight.js v1.1.0 <https://github.com/bestiejs/spotlight.js/>
* Spotlight.js v1.2.0 <https://github.com/bestiejs/spotlight.js/>
* Copyright 2011-2016 John-David Dalton <http://allyoucanleet.com/>
* Based on Waldo <https://github.com/angus-c/waldo/>,
* Copyright 2011-2016 Angus Croll <http://javascriptweblog.wordpress.com/>
Expand Down Expand Up @@ -622,7 +622,7 @@
* @memberOf spotlight
* @type string
*/
spotlight.version = '1.1.0';
spotlight.version = '1.2.0';

spotlight.byKind = byKind;
spotlight.byName = byName;
Expand Down

0 comments on commit 7a1ebd1

Please sign in to comment.