varint-decoder
Version:
Parse all the varints in a Buffer (for when there are varints everywhere)
29 lines (21 loc) • 1.48 kB
Markdown
varint-decoder
==============
[](http://ipn.io)
[](http://ipfs.io/)
[](http://webchat.freenode.net/?channels=%23ipfs)
[](https://coveralls.io/github/diasdavid/varint-decoder?branch=master)
[](https://travis-ci.org/diasdavid/varint-decoder)
[](https://circleci.com/gh/diasdavid/varint-decoder)
[](https://david-dm.org/diasdavid/varint-decoder) [](https://github.com/feross/standard)


> Parse all the varints in a Buffer (for when there are varints everywhere)
# Usage
## API
```JavaScript
const vd = require('varint-decoder')
const buf = new Buffer('000110', 'hex')
const decoded = vd(buf)
console.log(decoded)
// [0, 1, 16]
```