Skip to content

Commit 1375bdc

Browse files
committed
Removing window references
1 parent 326e4f4 commit 1375bdc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

debug/filesize.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @author Jason Mulligan <[email protected]>
3232
* @version 1.3
3333
*/
34-
(function (window) {
34+
(function (global) {
3535
"use strict";
3636

3737
/**
@@ -69,5 +69,5 @@
6969
};
7070

7171
// AMD support
72-
typeof define === "function" ? define("filesize", filesize) : window.filesize = filesize;
73-
})(window);
72+
typeof define === "function" ? define("filesize", filesize) : global.filesize = filesize;
73+
})(this);

production/filesize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
* @author Jason Mulligan <[email protected]>
3232
* @version 1.3
3333
*/
34-
(function(a){"use strict";var b=function(a,b){var c=String(a).indexOf(".")>-1?parseFloat(a):parseInt(a),d=[{B:0},{KB:1024},{MB:1048576},{GB:1073741824},{TB:1099511627776}],e=d.length,f="",g,h,i,j;b=typeof b=="undefined"?2:parseInt(b);while(e--){j=d[e];for(i in j)if(j.hasOwnProperty(i)){g=j[i],h=i;break}if(c>=g){f=(h==="B"?c:(c/g).toFixed(b))+h;break}}return f};typeof define=="function"?define("filesize",b):a.filesize=b})(window)
34+
(function(a){"use strict";var b=function(a,b){var c=String(a).indexOf(".")>-1?parseFloat(a):parseInt(a),d=[{B:0},{KB:1024},{MB:1048576},{GB:1073741824},{TB:1099511627776}],e=d.length,f="",g,h,i,j;b=typeof b=="undefined"?2:parseInt(b);while(e--){j=d[e];for(i in j)if(j.hasOwnProperty(i)){g=j[i],h=i;break}if(c>=g){f=(h==="B"?c:(c/g).toFixed(b))+h;break}}return f};typeof define=="function"?define("filesize",b):a.filesize=b})(this)

0 commit comments

Comments
 (0)