Update README.md

This commit is contained in:
Shawn K 2019-01-06 19:51:56 -06:00 committed by GitHub
parent 9587051289
commit cfb655f4ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,3 +30,29 @@ The LBRY format is a multimedia-format designed to promote interoperability and
## Requirements
- Node.js v11.6.0 (see https://nodejs.org/docs/v11.6.0/api/esm.html)
## Usage
Install `npm i https://github.com/lbryio/lbry-format.git`
### Pack
```
const lbryFormat = require('lbry-format');
// Pack `./` to `package.lbry`
lbryFormat.packDirectory('./', {
fileName: 'package.lbry',
});
```
### Unpack
```
const lbryFormat = require('lbry-format');
// Unpack `package.lbry` to `./`
lbryFormat.unpackDirectory('./', {
fileName: 'package.lbry',
});
```