goreleaser-action/node_modules/to-buffer
CrazyMax e28e23212c Initial commit 2019-09-20 22:23:46 +02:00
..
.travis.yml Initial commit 2019-09-20 22:23:46 +02:00
LICENSE Initial commit 2019-09-20 22:23:46 +02:00
README.md Initial commit 2019-09-20 22:23:46 +02:00
index.js Initial commit 2019-09-20 22:23:46 +02:00
package.json Initial commit 2019-09-20 22:23:46 +02:00
test.js Initial commit 2019-09-20 22:23:46 +02:00

README.md

to-buffer

Pass in a string, get a buffer back. Pass in a buffer, get the same buffer back.

npm install to-buffer

build status

Usage

var toBuffer = require('to-buffer')
console.log(toBuffer('hi')) // <Buffer 68 69>
console.log(toBuffer(Buffer('hi'))) // <Buffer 68 69>
console.log(toBuffer('6869', 'hex')) // <Buffer 68 69>
console.log(toBuffer(43)) // throws

License

MIT