Comparing version 0.3.0 to 0.3.1
@@ -18,2 +18,3 @@ /*! @preserve | ||
case "xlsx": return "binary"; | ||
case "xls": return "binary"; | ||
default: return "utf8"; | ||
@@ -78,2 +79,12 @@ } | ||
}, | ||
xls: function(text, options, cb) { | ||
var XLS=require("xlsjs"); | ||
var workbook=XLS.read(new Buffer(text), { type: "buffer" }); | ||
var res={}; | ||
workbook.SheetNames.forEach(function(sheetName) { | ||
var roa=XLS.utils.sheet_to_row_object_array(workbook.Sheets[sheetName]); | ||
if (roa.length>0) res[sheetName]=roa; | ||
}); | ||
cb(null, res); | ||
}, | ||
}; | ||
@@ -80,0 +91,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"author": "Christian Zangl", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"keywords": [ | ||
@@ -35,11 +35,12 @@ "json", | ||
"dependencies": { | ||
"cson-safe": "^1.0.5", | ||
"cson-safe": "^1.0.5-moved", | ||
"fast-csv": "^0.5.5", | ||
"hjson": "^1.6.1", | ||
"ini": "^1.3.2", | ||
"js-yaml": "^3.2.5", | ||
"ini": "^1.3.3", | ||
"js-yaml": "^3.2.6", | ||
"json5": "^0.4.0", | ||
"xlsjs": "^0.7.5", | ||
"xlsx": "^0.7.12", | ||
"xml2js": "^0.4.4" | ||
"xml2js": "^0.4.5" | ||
} | ||
} |
@@ -11,3 +11,3 @@ # any-json | ||
any-json can be used to convert (almost) anything to JSON. | ||
This version supports: cson, csv, hjson, ini, json, json5, xlsx, xml, yaml | ||
This version supports: cson, csv, hjson, ini, json, json5, xls, xlsx, xml, yaml | ||
@@ -14,0 +14,0 @@ any-json will read the given input file or read from stdin. |
48020
15
133
9
+ Addedxlsjs@^0.7.5
+ Addedcfb@0.11.1(transitive)
+ Addedcodepage@1.15.0(transitive)
+ Addedexit-on-epipe@1.0.1(transitive)
+ Addedxlsjs@0.7.6(transitive)
- Removedcfb@1.2.2(transitive)
Updatedcson-safe@^1.0.5-moved
Updatedini@^1.3.3
Updatedjs-yaml@^3.2.6
Updatedxml2js@^0.4.5