to-buffer
Pass in a string, get a buffer back. Pass in a buffer, get the same buffer back
Last updated 8 years ago by mafintosh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install to-buffer 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.1                                ...           latest (7 years ago)

4 Versions

  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE