Git Product home page Git Product logo

buffer-to-string's Introduction

buffer-to-string Build Status

A better Buffer.toString()

Displays buffer content in hex. Characters are grouped into two-character bytes, with a customizable line wrap width.

Install

$ npm install --save buffer-to-string

Usage

const bufferToString = require('buffer-to-string');

bufferToString(new Buffer([0, 1, 2, 3, 4, 5, 6]), 3);
/*
00 01 02
03 04 05
06
 */

API

bufferToString(buffer, [width])

input

Type: Buffer

The Buffer to stringify.

width

Type: number
Default: 20

The maximum width before wrapping a newline. It is measured in bytes displayed. The maximum character width can be determined by computing (3 * width) - 1.

License

MIT © Isaac Z. Schlueter, James Talmage

buffer-to-string's People

Contributors

greenkeeperio-bot avatar jamestalmage avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.