Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow `predef` option to be an object, to allow the specification of …

…the read-only status of each variable (similar to `/*globals foo:true */`)
  • Loading branch information...
commit aa12588adb313a4b78e4f07291a14f4044b1851d 1 parent f73d206
@joshvarner authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 fulljslint.js
View
6 fulljslint.js
@@ -5408,6 +5408,12 @@ loop: for (;;) {
for (i = 0; i < a.length; i += 1) {
predefined[a[i]] = true;
}
+ } else if (a instanceof Object) {
+ for (i in a) {
+ if (a.hasOwnProperty(i)) {
+ predefined[i] = (a[i] === true);
+ }
+ }
}
if (o.adsafe) {
o.safe = true;
Please sign in to comment.
Something went wrong with that request. Please try again.