Grep your js objects
github.com
github.com
Object.defineProperty(Object.prototype, 'grep', {
enumerable: false,
value: /* ... */
});
rather than Object.prototype.grep = /* ... */
This way, your 'grep' does not pollute for () loops.Great suggestion, thank you!
Does something like that already exist, or will I have to write it?
if (i.match(/^[$A-Z_][0-9A-Z_$]*$/i)) {
brokenWhat would you suggest as a better test?