Skip to content
Browse files

some doc cleanup, putting 'buffer' type back in

  • Loading branch information...
1 parent e7c47bf commit c1cda0be0b162cab065d98825d06cf7ee0d57fc9 @broofa committed Sep 6, 2011
Showing with 20 additions and 21 deletions.
  1. +3 −7 README.md
  2. +17 −14 node.types
View
10 README.md
@@ -8,7 +8,7 @@ Install with [npm](http://github.com/isaacs/npm):
npm install mime
-## API
+## API - Queries
### mime.lookup(path)
Get the mime type associated with a file. This is method is case-insensitive. Everything in path up to and including the last '/' or '.' is ignored, so you can pass it paths, filenames, or extensions, like so:
@@ -31,13 +31,9 @@ Get the mime type associated with a file. This is method is case-insensitive. Ev
(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
-## "Can you add support for [some type/extension]?"
+## API - Customizing
-Start by adding support for the type in your project using the mime.define() or mime.load() methods (documented below).
-
-If there's a type that is shared across node.js modules, by different people, create an issue here and we'll add it if it makes sense.
-
-If the type in question applies to projects outside the node.js community (e.g. if [IANA](http://www.iana.org/assignments/media-types/) approves a new type) file a [bug with Apache](http://httpd.apache.org/bug_report.html) and create an issue here that links to it.
+The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [[requesting new types]].
### mime.define() - Add custom mime/extension mappings
View
31 node.types
@@ -1,27 +1,30 @@
-###
-# EDITORS: When proposing new types be added here, please short "What"/"Why"
-# info explaining why the enhancements should be made (as opposed to, say,
-# simply using mime.load() to customize node-mime in your local project).
-# Thanks!
-###
-
# What: HTML5 application cache manifest
# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps
# per https://developer.mozilla.org/en/offline_resources_in_firefox
+# Added by: louisremi
text/cache-manifest appcache manifest
-# What: Music formats used by iTunes.
-# Why: #1 music service, millions of these files around
+# What: node binary buffer format
+# Why: semi-standard extension w/in the node community
+# Added by: tootallnate
+application/octet-stream buffer
+
+# What: The "protected" MP-4 formats used by iTunes.
+# Why: Required for streaming music to browsers (?)
+# Added by: broofa
application/mp4 m4p
audio/mp4 m4a
-# REMOVE? Looks like this was an aborted proposal from mozilla for their webapp
-# support. Can't find much info about it.
+# What: ???
+# Why: ???
+# Added by: louisremi
+#
+# (Flagging for removal. Asking louisremi for more information. --broofa)
application/x-web-app-manifest+json webapp
-# What: A music playlist format
-# Why: A de-facto standard, supported by a variety of music players.
-# See http://en.wikipedia.org/wiki/M3U
+# What: Music playlist format (http://en.wikipedia.org/wiki/M3U)
+# Why: See discussion here: https://github.com/bentomas/node-mime/pull/6
+# Added by: mjrusso
application/x-mpegURL m3u8
# What: Video format

0 comments on commit c1cda0b

Please sign in to comment.
Something went wrong with that request. Please try again.