Re:Superior jQuery plugin template
by axiak on Monday March 19, 2012 @03:34PM
(#3725747)
What happens if I type:
In my recent jquery plugin I considered doing a typeof check myself but decided against it since it was too brittle. I instead checked to see if the options was === what I expected it to be first.
[ Parent
| on HN ]
Well, I think this is getting a little nit picky. I would rather have a smaller footprint for my plugin then putting a bunch of checks like this in. I don't think I've ever passed in a string that way, that would seem to me like a very rare condition.