JSFiddle - React, Tailwind, and code Playground
by snover
HTML
<script src="http://code.jquery.com/jquery-1.4.3rc2.js"></script>
JavaScript
function cacheLength() {
var l=0;
for (var i in $.cache) { l++ };
return l;
}
$(function() {
var length = {
before: cacheLength()
}
$(document.body).html('<span>hello</span>');
$('span').wrap('<div>');
length.inBetween = cacheLength();
$(document.body).html('');
length.after = cacheLength();
console.log(length);
console.log('cached clean up properly: ', length.before == length.after);
});