-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ | ||
//(...) | ||
}); | ||
``` |