From 9e41edcbd27292bd67e2e3807fe940ae517d0d71 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Wed, 30 Oct 2013 19:53:12 -0700 Subject: [PATCH] cleaning up XLSX leak --- bits/50_xlsxheader.js | 3 ++- bits/70_xlsx.js | 6 +++--- bits/89_xlsxfooter.js | 2 +- xlsx.js | 11 ++++++----- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bits/50_xlsxheader.js b/bits/50_xlsxheader.js index fafc9aa..b36237e 100644 --- a/bits/50_xlsxheader.js +++ b/bits/50_xlsxheader.js @@ -1 +1,2 @@ -var XLSX = (function(){ +var XLSX = {}; +(function(XLSX){ diff --git a/bits/70_xlsx.js b/bits/70_xlsx.js index 5a85b12..e5fe8a1 100644 --- a/bits/70_xlsx.js +++ b/bits/70_xlsx.js @@ -520,6 +520,6 @@ function readFileSync(data, options) { return readSync(data, o); } -this.read = readSync; -this.readFile = readFileSync; -this.parseZip = parseZip; +XLSX.read = readSync; +XLSX.readFile = readFileSync; +XLSX.parseZip = parseZip; diff --git a/bits/89_xlsxfooter.js b/bits/89_xlsxfooter.js index 90b30b2..4136572 100644 --- a/bits/89_xlsxfooter.js +++ b/bits/89_xlsxfooter.js @@ -1,4 +1,4 @@ return this; -})(); +})(XLSX); diff --git a/xlsx.js b/xlsx.js index 67934ce..c05d6bb 100644 --- a/xlsx.js +++ b/xlsx.js @@ -222,7 +222,8 @@ SSF.format = format; return SSF; })(); -var XLSX = (function(){ +var XLSX = {}; +(function(XLSX){ function parsexmltag(tag) { var words = tag.split(/\s+/); var z = {'0': words[0]}; @@ -950,12 +951,12 @@ function readFileSync(data, options) { return readSync(data, o); } -this.read = readSync; -this.readFile = readFileSync; -this.parseZip = parseZip; +XLSX.read = readSync; +XLSX.readFile = readFileSync; +XLSX.parseZip = parseZip; return this; -})(); +})(XLSX); var _chr = function(c) { return String.fromCharCode(c); };