} );
}
- function humanSize( bytes ) {
+ function humanSize( bytesInput ) {
var i,
+ bytes = +bytesInput,
units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
- if ( !$.isNumeric( bytes ) || bytes === 0 ) {
- return bytes;
+ if ( bytes === 0 || isNaN( bytes ) ) {
+ return bytesInput;
}
for ( i = 0; bytes >= 1024; bytes /= 1024 ) {
style.textContent = css;
document.body.appendChild( style );
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( style.sheet.cssRules, function ( index, rule ) {
selectors.total++;
// document.querySelector() on prefixed pseudo-elements can throw exceptions