passthrough-encoding
Version:
An encoder that encodes buffers/strings to a buffer and is abstract-encoding compatible
28 lines (17 loc) • 809 B
Markdown
and is [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compatible
```
npm install passthrough-encoding
```
[](https://github.com/mafintosh/abstract-encoding)
[](https://travis-ci.org/mafintosh/passthrough-encoding)
``` js
var enc = require('passthrough-encoding')
console.log(enc.encode(Buffer('hello'))) // prints Buffer('hello')
console.log(enc.encode('hello')) // prints Buffer('hello')
```
See [mafintosh/abstract-encoding](https://github.com/mafintosh/abstract-encoding#api)
MIT
An encoder that encodes buffers/strings to a buffer