Dominic Myers writes about all sorts of stuff to do with HTML, CSS, JavaScript and a fair chunk of self-indulgent stuff. Thoughts and opinions are all his own, and nothing to do with any employer.
Wednesday, 28 August 2013
isBlank()
Another brilliant little bit of code to complement empty() is isBlank():
function isBlank(str){return(!str ||/^\s*$/.test(str));}
No comments:
Post a Comment