Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

better-buffer-inspect

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-buffer-inspect

Monkeypatch Buffer.prototype.inspect to show size and also text content if UTF-8

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

better-buffer-inspect

NPM version Build status

better-buffer-inspect makes util.inspect(aBuffer) show the size of a node Buffer, as well as its text content if it is <= 512 bytes and decodes as UTF-8.

Install

In your project, run:

npm install better-buffer-inspect --save

or install from the GitHub repo:

npm install ludios/better-buffer-inspect --save

API

Requiring better-buffer-inspect will override Buffer.prototype.inspect.

> require('better-buffer-inspect');

> new Buffer(4).fill(255)
<Buffer size=4: ff ff ff ff>

> new Buffer("hello world\n")
<Buffer size=11: utf8 'hello world\n'>

> new Buffer("\ucccc")
<Buffer size=3: utf8 '쳌'>

Keywords

FAQs

Package last updated on 09 Sep 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc