New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-wire-protocol

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-wire-protocol - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

3

HISTORY.md

@@ -0,1 +1,4 @@

# 0.2.0
- expose separator constant value.
# 0.1.0

@@ -2,0 +5,0 @@ - browser support ( intended for xpcshell primarily though )

11

lib/index.js
(function(global, exports) {
var HAS_BUFFER = typeof Buffer !== 'undefined';
var SEPERATOR_CODE = 58; // UTF8 / ASCII value for :
var SEPERATOR = ':';
var SEPARATOR = ':';
var SEPARATOR_CODE = SEPARATOR.charCodeAt(0);
var EventEmitter =

@@ -31,3 +31,3 @@ global.EventEmitter2 ||

do {
if (buffer[index] === SEPERATOR_CODE)
if (buffer[index] === SEPARATOR_CODE)
return index;

@@ -132,3 +132,3 @@

return len + SEPERATOR + json;
return len + SEPARATOR + json;
}

@@ -176,3 +176,3 @@

if (this._pendingLength === null) {
var idx = indexInBuffer(this._buffer, SEPERATOR);
var idx = indexInBuffer(this._buffer, SEPARATOR);
if (idx === -1)

@@ -233,2 +233,3 @@ return;

exports.Stream = Stream;
exports.separator = SEPARATOR;
}).apply(

@@ -235,0 +236,0 @@ null,

{
"name": "json-wire-protocol",
"version": "0.1.3",
"version": "0.2.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "description": "JSON wire protocol parser/writer (used in mozilla debugger protocol)",

@@ -16,2 +16,6 @@ suite('json wire protocol', function() {

test('.separator', function() {
assert.ok(jsonWireProtocol.separator);
});
suite('#stringify', function() {

@@ -18,0 +22,0 @@ test('ASCII only', function() {

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