0.1.2 • Published 10 years ago
guess-file v0.1.2
Guess-file
Guessing csv, xml, json files in quick speed.
Example
var guess = require('../');
var fs = require('fs');
// first arguemnt is the file you want to guess,
// second is the encoding or other settings for Read stream in nodejs,
// third is the callback function with a type string value.
var guesscsv = guess('./test/data/test.xml', {encoding: 'utf8'}, cb)
guesscsv;
function cb(type) {
console.log(type)
// xml
}
Note
This is just guessing file format might wrong, but work mostly :)
License
MIT