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

engine.io-parser

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io-parser - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

build/cjs/contrib/base64-arraybuffer.js

4

build/cjs/decodePacket.browser.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const commons_js_1 = require("./commons.js");
const base64_arraybuffer_1 = require("@socket.io/base64-arraybuffer");
const base64_arraybuffer_js_1 = require("./contrib/base64-arraybuffer.js");
const withNativeArrayBuffer = typeof ArrayBuffer === "function";

@@ -35,3 +35,3 @@ const decodePacket = (encodedPacket, binaryType) => {

if (withNativeArrayBuffer) {
const decoded = (0, base64_arraybuffer_1.decode)(data);
const decoded = (0, base64_arraybuffer_js_1.decode)(data);
return mapBinary(decoded, binaryType);

@@ -38,0 +38,0 @@ }

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

/// <reference types="node" />
declare const PACKET_TYPES: any;

@@ -7,3 +6,3 @@ declare const PACKET_TYPES_REVERSE: any;

export declare type PacketType = "open" | "close" | "ping" | "pong" | "message" | "upgrade" | "noop" | "error";
export declare type RawData = string | Buffer | ArrayBuffer | ArrayBufferView | Blob;
export declare type RawData = any;
export interface Packet {

@@ -10,0 +9,0 @@ type: PacketType;

import { ERROR_PACKET, PACKET_TYPES_REVERSE } from "./commons.js";
import { decode } from "@socket.io/base64-arraybuffer";
import { decode } from "./contrib/base64-arraybuffer.js";
const withNativeArrayBuffer = typeof ArrayBuffer === "function";

@@ -4,0 +4,0 @@ const decodePacket = (encodedPacket, binaryType) => {

import encodePacket from "./encodePacket.js";
import decodePacket from "./decodePacket.js";
import { Packet, PacketType, RawData, BinaryType } from "./commons";
import { Packet, PacketType, RawData, BinaryType } from "./commons.js";
declare const encodePayload: (packets: Packet[], callback: (encodedPayload: string) => void) => void;

@@ -5,0 +5,0 @@ declare const decodePayload: (encodedPayload: string, binaryType?: BinaryType) => Packet[];

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "5.0.3",
"version": "5.0.4",
"main": "./build/cjs/index.js",

@@ -34,5 +34,2 @@ "module": "./build/esm/index.js",

},
"dependencies": {
"@socket.io/base64-arraybuffer": "~1.0.2"
},
"scripts": {

@@ -39,0 +36,0 @@ "compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",

# engine.io-parser
[![Build Status](https://github.com/socketio/engine.io-parser/workflows/CI/badge.svg)](https://github.com/socketio/engine.io-parser/actions)
[![Build Status](https://github.com/socketio/engine.io-parser/workflows/CI/badge.svg?branch=main)](https://github.com/socketio/engine.io-parser/actions)
[![NPM version](https://badge.fury.io/js/engine.io-parser.svg)](https://npmjs.com/package/engine.io-parser)

@@ -6,0 +6,0 @@

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