Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add readme

  • Loading branch information...
commit 55f8ddedebe782bccaa63014271407db4dead65a 1 parent 4cbf0ea
Benjamin Thomas authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 README.md
View
19 README.md
@@ -0,0 +1,19 @@
+A library for doing simple mime-type lookups.
+
+ var mime = require('mime');
+
+ // all these return 'text/plain'
+ mime.lookup('/path/to/file.txt');
+ mime.lookup('file.txt');
+ mime.lookup('.txt');
+
+It can also look up common charsets for specific mime-types. (Useful in a web
+framework):
+
+ var mime = require('mime');
+
+ // returns 'UTF-8'
+ mime.charset.lookup('text/plain');
+
+Please help me make sure my lookup tables are complete! Any additions will be
+appreciatively merged!
Please sign in to comment.
Something went wrong with that request. Please try again.