Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit f2ccbda

Browse files
committed
Merge pull request #45 from kevinmctigue/patch-1
Fixed global on line 14 and removed unnecessary fs require
2 parents b688e9a + f879b43 commit f2ccbda

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/xml2json.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var expat = require('node-expat');
2-
var fs = require('fs');
32

43
// This object will hold the final result.
54
var obj = {};
@@ -12,7 +11,7 @@ function startElement(name, attrs) {
1211
currentElementName = name;
1312
if(options.coerce) {
1413
// Looping here in stead of making coerce generic as object walk is unnecessary
15-
for(key in attrs) {
14+
for(var key in attrs) {
1615
attrs[key] = coerce(attrs[key]);
1716
}
1817
}

0 commit comments

Comments
 (0)