Content-Check
Utility for working with the content-type
header isomorphically.
Installation
npm install content-check
API
check(data: any): string|undefined
Attempt to guess the content type for some data. Returns undefined if it could not be guessed.
;; ; // "text/plain"; // "text/html"; // "application/json"; // "application/octet-stream"; // "application/javascript"
Contributions
- Use
npm test
to run tests.
Please feel free to create a PR!