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 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

16

lib/index.js

@@ -43,3 +43,3 @@ 'use strict';

if (signature.substr(-2) !== _misc.CRLF.toString()) {
throw new Error(`${ key } ${ signature } does not end in CRLF`);
throw new Error(`${key} ${signature} does not end in CRLF`);
}

@@ -57,3 +57,3 @@

if (!this.types[arg]) throw new Error(`arg ${ arg } does not have a type defined`);
if (!this.types[arg]) throw new Error(`arg ${arg} does not have a type defined`);
return arg;

@@ -149,14 +149,14 @@ });

(0, _assert2.default)(argsOptional || !expectsArgsLength || args || args.length, `${ identifier } requires args`);
(0, _assert2.default)(argsOptional || !args || !args.length || expectsArgsLength === argsLength, `${ identifier } expects ${ spec.args.length } args`);
(0, _assert2.default)(argsOptional || !expectsArgsLength || args || args.length, `${identifier} requires args`);
(0, _assert2.default)(argsOptional || !args || !args.length || expectsArgsLength === argsLength, `${identifier} expects ${spec.args.length} args`);
if (!args || !argsLength) {
return new Buffer(identifier + _misc.CRLF);
return Buffer.from(identifier + _misc.CRLF);
}
if (spec.parts.length < 2) {
return new Buffer(identifier + ' ' + args.join(' ') + _misc.CRLF);
return Buffer.from(identifier + ' ' + args.join(' ') + _misc.CRLF);
}
let buffers = [new Buffer(identifier + ' ')];
let buffers = [Buffer.from(identifier + ' ')];

@@ -176,3 +176,3 @@ let offset = 0;

} else {
buffers.push(new Buffer(arg.toString()));
buffers.push(Buffer.from(arg.toString()));
}

@@ -179,0 +179,0 @@ });

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -7,4 +7,4 @@ Object.defineProperty(exports, "__esModule", {

exports.reduce = reduce;
const CRLF = exports.CRLF = new Buffer([0x0d, 0x0a]);
const SPACE = exports.SPACE = new Buffer(' ');
const CRLF = exports.CRLF = Buffer.from([0x0d, 0x0a]); // '\r\n'
const SPACE = exports.SPACE = Buffer.from([0x20]); // ' '

@@ -11,0 +11,0 @@ function reduce(collection, callback, accumulator) {

{
"name": "beanstalkd-protocol",
"version": "1.0.0",
"version": "1.0.1",
"description": "Beanstalkd protocol parser for Node.js/Javascript",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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