JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12418194
  • Score
    100M100P100Q210701F
  • License MIT

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

Package Exports

  • to-buffer
  • to-buffer/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (to-buffer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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