Spotlight.js v1.2.0
An object crawler/property search library that works on nearly all JavaScript platforms.
Documentation
Installation
Spotlight.js’ only hard dependency is lodash.
In a browser:
In an AMD loader:
;
Using npm:
$ npm i --save spotlight
In Node.js:
var spotlight = ;
Usage example:
// find all "length" propertiesspotlight; // or find all "map" properties on jQueryspotlight; // or all properties with `jQuery` objectsspotlight; // or all properties with `RegExp` valuesspotlight; // or all properties with `null` valuesspotlight; // or all properties with `undefined` valuesspotlight; // or all constructorsspotlight; // or all properties with the value `0`spotlight; // or all properties containing "oo" in their namespotlight; // or all properties with falsey valuesspotlight;
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.
BestieJS
Spotlight.js is part of the BestieJS “Best in Class” module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, & plenty of documentation.