Skip to content

Commit

Permalink
Add README example and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
manrueda committed Oct 1, 2015
1 parent a8fa6bc commit 4f93797
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# zip-mapper [![Build Status](https://travis-ci.org/ManRueda/zip-mapper.svg)](https://travis-ci.org/ManRueda/zip-mapper) [![Coverage Status](https://coveralls.io/repos/ManRueda/zip-mapper/badge.svg?branch=master&service=github)](https://coveralls.io/github/ManRueda/zip-mapper?branch=master)
Unzip a .zip file and map the structure in an object

## Usage
The ZipMapper mapper has 3 parameters, only 2 required.
ZipMapper(filePath, [onMemory], cb);
* filePath (string): Relative or absolute path to the zip file.
* onMemory (bool): Define of the files content will be loaded in memory or not.
* cb (Function): Callback, receive 2 parameters. First err object and second the mapped zip.

```javascript
var ZipMapper = require('zip-mapper');

var mapper = new ZipMapper(filePath, true, function(err, map){
//(...)
});
```

0 comments on commit 4f93797

Please sign in to comment.