Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
seangarner committed Dec 22, 2014
1 parent be05266 commit 34a4550
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ npm install stream-mmmagic
## Use
```
var magic = require('stream-mmmagic');
// optional: provide custom magic-file
magic.config.magicFile = 'path/to/custom/magic/file';
var input = fs.createReadStream('somefile.csv');
Expand All @@ -35,6 +33,16 @@ magic(input, function (err, mime, output) {
//- <the file content>
```

### Custom Magic File
A magic file is bundled with the mmmagic npm module but if you want to use your own then set
`magic.config.magicFile` before calling `magic`.

```
magic.config.magicFile = '/path/to/custom/magic/file';
magic(input, callback); // uses above magic file
```

## NOTICE
This uses [buffer-peek-stream](https://github.com/seangarner/node-buffer-peek-stream) under the
covers which is, at the moment, best described as experimental.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stream-mmmagic",
"version": "0.2.0",
"version": "0.3.0",
"description": "Node module to sniff the start of a stream (non-destructively) to detect the file type and encoding",
"main": "lib/stream-mmmagic.js",
"scripts": {
Expand Down

0 comments on commit 34a4550

Please sign in to comment.