MCPcopy
hub / github.com/mongodb/node-mongodb-native / assert

Function assert

docs/2.2/js/jquery.js:1325–1340  ·  view source on GitHub ↗

* Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result

( fn )

Source from the content-addressed store, hash-verified

1323 * @param {Function} fn Passed the created div and expects a boolean result
1324 */
1325function assert( fn ) {
1326 var div = document.createElement("div");
1327
1328 try {
1329 return !!fn( div );
1330 } catch (e) {
1331 return false;
1332 } finally {
1333 // Remove from its parent by default
1334 if ( div.parentNode ) {
1335 div.parentNode.removeChild( div );
1336 }
1337 // release memory in IE
1338 div = null;
1339 }
1340}
1341
1342/**
1343 * Adds the same handler for all of the specified attrs

Callers 2

jquery.jsFile · 0.70

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected