4 ms·
I'm not a huge fan of the double wrap of anonymous functions. The inner one seems entirely superfluous unless you're adding multiple plugins in one file and, I
by maemilius 13y ago
I'm not a huge fan of the double wrap of anonymous functions. The inner one seems entirely superfluous unless you're adding multiple plugins in one file and, I think, makes the code a little harder to read since you have to look at the invocation of the function to get all the information you need about it.
It seems a lot clearer to simply declare `var pluginName = "borderize";` at the top of the function than to pass it in. Granted, that does add 6 characters to the total length of the file.
- kolodny 13y agoWell I plan on using this for multiple plugins in that same iffe. I also like that I'm able to copy/paste it as a block inside other jQuery blocks.
- jbeja 13y ago"I plan on using this for multiple plugins in that same iffe" Isn't a little bit inconvinient, talking about modularity, will you be the only one using those plugins?
- xiata 13y agoDouble wrapping is necessary for closure compiler to collapse variable names.