Socket
Socket
Sign inDemoInstall

to-buffer

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    to-buffer

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


Version published
Weekly downloads
2.6M
decreased by-19.91%
Maintainers
1
Install size
3.96 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 26 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc