You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 514B

1234567891011121314151617181920212223
  1. # to-buffer
  2. Pass in a string, get a buffer back. Pass in a buffer, get the same buffer back.
  3. ```
  4. npm install to-buffer
  5. ```
  6. [![build status](https://travis-ci.org/mafintosh/to-buffer.svg?branch=master)](https://travis-ci.org/mafintosh/to-buffer)
  7. ## Usage
  8. ``` js
  9. var toBuffer = require('to-buffer')
  10. console.log(toBuffer('hi')) // <Buffer 68 69>
  11. console.log(toBuffer(Buffer('hi'))) // <Buffer 68 69>
  12. console.log(toBuffer('6869', 'hex')) // <Buffer 68 69>
  13. console.log(toBuffer(43)) // throws
  14. ```
  15. ## License
  16. MIT