engine.io-parser
Advanced tools
Comparing version 5.0.3 to 5.0.4
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28576
0
26
559
- Removed@socket.io/base64-arraybuffer@~1.0.2
- Removed@socket.io/base64-arraybuffer@1.0.2(transitive)