You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gaoshuguang 151dd5d70e 首次提交 1 month ago
..
.github 首次提交 1 month ago
node_modules/isarray 首次提交 1 month ago
.eslintrc 首次提交 1 month ago
.nycrc 首次提交 1 month ago
CHANGELOG.md 首次提交 1 month ago
LICENSE 首次提交 1 month ago
README.md 首次提交 1 month ago
index.js 首次提交 1 month ago
package.json 首次提交 1 month ago

README.md

to-buffer Version Badge

Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.

github actions coverage dependency status dev dependency status License Downloads

npm badge

npm install to-buffer

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