You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been experimenting with C-style "namespacing" in a couple of my frameworks, in particular, Jo. For example: joView, joContainer, joControl are all global widget classes. Since they are global, I do not need to specify var = joView, and so I prefer to save a good chunk of unzipped file size (it's a small framework).
I can solve this with the global flag, and that's cool, but I'd like to be able to specify something like:
/*jshint */
/*global jo*:true */
The text was updated successfully, but these errors were encountered:
Matching a wildcard * could be implemented by refactoring out checks to predefined[key] === bool to an isPredefined(key) === bool check. Where
function() isPredefined(key) {
if (typeof predefined[key] === "boolean") {
return predefined[key];
} else {
var bool;
for (var i = 1;i <= key.length; i++) {
bool = predefined[key.slice(0,i) + "*"];
if (typeof bool === "boolean") {
return bool;
}
}
}
return false;
}
Refactoring isPredefined to implement regex checking is also possible but provides a lot of danger for false positives (This would also require a regex global option)
I've been experimenting with C-style "namespacing" in a couple of my frameworks, in particular, Jo. For example: joView, joContainer, joControl are all global widget classes. Since they are global, I do not need to specify
var = joView
, and so I prefer to save a good chunk of unzipped file size (it's a small framework).I can solve this with the
global
flag, and that's cool, but I'd like to be able to specify something like:The text was updated successfully, but these errors were encountered: