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

beanstalkd-protocol

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beanstalkd-protocol

Beanstalkd protocol parser for Node.js/Javascript

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Beanstalkd protocol parser for Node.js/Javascript

npm install --save beanstalkd-protocol

Examples

See unit tests

import Protocol from 'beanstalkd-protocol';

API

protocol.parseCommand(buffer)

Parses a Buffer for a consumer/worker command.

Buffer can be a partial chunk of a stream, the method will return values based on whether or not it has enough information to parse the full command yet.

Will discard command data from put, etc commands.

  • buffer Buffer to parse. Can be a partial chunk of a stream.
  • Returns: [null, {command, args}] returned if command was the only thing in the chunk
  • Returns: [Buffer, null] returns passed chunk if no command was found or not enough data was available to fully parse command
  • Returns: [Buffer, {command, args}] returns remaining part of chunk + found command if chunk is larger than command

Keywords

FAQs

Package last updated on 29 Dec 2016

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