untar-memory
Version:
Untar a tarball to an in-memory filesystem
39 lines (26 loc) • 1.12 kB
Markdown
# untar-memory
> Untar a tarball to an [in-memory filesystem](https://github.com/webpack/memory-fs)
[](https://travis-ci.org/queckezz/untar-memory)
[](https://npmjs.org/package/untar-memory)
[](https://david-dm.org/queckezz/untar-memory)
[](./license)
[](https://github.com/feross/standard)
## Installation
```bash
$ npm install untar-memory
```
## Example
```js
const untarToMemory = require('untar-memory')
untarToMemory('./tar-file.tgz') // or pass in an existing read stream
.then((memoryFileSystem) => {
memoryFileSystem.readFileSync('/package/readme.md', 'utf8')
// -> # title ...
})
```
## Tests
```bash
$ npm test
```
## License
[MIT](./license)