Saturday, 26 November 2016

What does the regex S mean in JavaScript?

What does /\S/ mean in a regex?



while (cur ! = null) {
if (cur.nodeType == 3 && ! /\S/. test(cur.nodeValue)) {
element. removeChild(cur);
} else if (cur. nodeType == 1) {
cleanWhitespace(cur);
}
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...