MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / hasClass

Function hasClass

libs/htmlwidgets-1.5.3/htmlwidgets.js:135–138  ·  view source on GitHub ↗
(el, className)

Source from the content-addressed store, hash-verified

133 }
134
135 function hasClass(el, className) {
136 var re = new RegExp("\\b" + escapeRegExp(className) + "\\b");
137 return re.test(el.className);
138 }
139
140 // elements - array (or array-like object) of HTML elements
141 // className - class name to test for

Callers 2

filterByClassFunction · 0.85
htmlwidgets.jsFile · 0.85

Calls 1

escapeRegExpFunction · 0.85

Tested by

no test coverage detected