Guess-api
Guessing api content type. Support text/plain
, text/csv
, text/xml
, application/json
. Useful in super large data, cause we use STREAM!
Install
npm install guess-api
Example
var guess = ; { console // result: // text/xml}
Support
Types
- text/csv
- text/xml
- application/json
protocol
- http
- https
How it work?
Only read the first chunk (why reading only the first chunk? cause will reduce lot of time of guessing super large data), and guess the encoding by using the first chunk.
License
MIT