Index: tools/csvparser.js |
diff --git a/tools/csvparser.js b/tools/csvparser.js |
index 6e101e206b91fccbfaaaf7b3a002363441411857..c7d46b535c708f7b696b59347a4df455fad6c8f7 100644 |
--- a/tools/csvparser.js |
+++ b/tools/csvparser.js |
@@ -26,15 +26,10 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Initlialize namespaces. |
-var devtools = devtools || {}; |
-devtools.profiler = devtools.profiler || {}; |
- |
- |
/** |
* Creates a CSV lines parser. |
*/ |
-devtools.profiler.CsvParser = function() { |
+function CsvParser() { |
}; |
@@ -42,14 +37,14 @@ devtools.profiler.CsvParser = function() { |
* A regex for matching a CSV field. |
* @private |
*/ |
-devtools.profiler.CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/; |
+CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/; |
/** |
* A regex for matching a double quote. |
* @private |
*/ |
-devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /""/g; |
+CsvParser.DOUBLE_QUOTE_RE_ = /""/g; |
/** |
@@ -57,9 +52,9 @@ devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /""/g; |
* |
* @param {string} line Input line. |
*/ |
-devtools.profiler.CsvParser.prototype.parseLine = function(line) { |
- var fieldRe = devtools.profiler.CsvParser.CSV_FIELD_RE_; |
- var doubleQuoteRe = devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_; |
+CsvParser.prototype.parseLine = function(line) { |
+ var fieldRe = CsvParser.CSV_FIELD_RE_; |
+ var doubleQuoteRe = CsvParser.DOUBLE_QUOTE_RE_; |
var pos = 0; |
var endPos = line.length; |
var fields = []; |