Browse files

Merge pull request #3 from ArtskydJ/patch-1

Improved readme code example
  • Loading branch information...
2 parents 803d451 + f2765a3 commit 2b48f477a774976ede5f056bef22ded91850e094 @creationix committed Jun 15, 2015
Showing with 5 additions and 3 deletions.
  1. +5 −3 README.markdown
View
8 README.markdown
@@ -15,9 +15,11 @@ If you choose to not use npm, or can't use it in your environment, then simply c
Simply load this library, configure your fallback mime type, and query it for the mime type of various filenames.
- var getMimeType = require('mime')('application/octect-stream');
- var file = "/bar/foo/baz.mp3";
- var type = getMimeType(file);
+```js
+var getMimeType = require('simple-mime')('application/octet-stream');
+var file = '/bar/foo/baz.mp3';
+var type = getMimeType(file); // => 'audio/mpeg'
+```
## Goal

0 comments on commit 2b48f47

Please sign in to comment.