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

readable

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

readable

make buffers into something you can slice bytes off at will, for when a stream is too much.

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
494
increased by54.86%
Maintainers
1
Weekly downloads
 
Created
Source

readable

make buffers into something you can slice bytes off at will, for when a stream is too much.

Installation

npm install readable

API

Readable(buf) → function read(n)

Creates your readable. Will cast buf to a Buffer.

read(n) → Buffer

Slices the first n bytes off, and hand them to you. If there aren't enough bytes left, we'll throw an error.

read(-1) → UInt8

Slices the first byte off, and hands it straight to you, no Buffer wrapping. Sugar for read(1)[0].

read.able

Amount of bytes left in the buffer.

read.push(chunk)

Push another chunk onto your buffer. Will cast chunk to a Buffer.

Keywords

FAQs

Package last updated on 06 Jun 2014

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