Skip to content

Commit

Permalink
Merge pull request #3 from ArtskydJ/patch-1
Browse files Browse the repository at this point in the history
Improved readme code example
  • Loading branch information
creationix committed Jun 15, 2015
2 parents 803d451 + f2765a3 commit 2b48f47
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.markdown
Expand Up @@ -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

Expand Down

0 comments on commit 2b48f47

Please sign in to comment.