Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Convert a string to a Buffer across Node versions

License

Notifications You must be signed in to change notification settings

strugee/node-string-to-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-string-to-buffer

This module is deprecated because Node 4 is end-of-life, so all currently-supported Node versions support Buffer.from(). Use that directly instead.

Build Status Coverage Status Greenkeeper badge

Convert a string to a Buffer across Node versions

See also to-buffer, which is similar but does slightly more, and safe-buffer, which is a complete replacement for Buffer which polyfills the safe behavior on old Node versions

Install

npm install string-to-buffer

Usage

var stringToBuffer = require('string-to-buffer')
stringToBuffer('foobar'); // Buffer

Version support

Supports Node 4+, may support earlier versions too.

Author

AJ Jordan [email protected]

License

MIT