parse-mime
A centralized parsing module that can be extended to handle any mime type
Installation
With packin: packin add jkroso/parse-mime
then in your app:
var parse =
API
parse(mime, data)
Takes a mimetype string and some data and returns the parsed value. If it doesn't know how to parse the given mimetype it will just return the data unchanged
// => [1,2,3]
parse.define(mime, fn)
Define a parser for a new mimetype
parse // => [1,2,3]
If the mimetype has already been defined then it will throw an error