@kim5257/socket.io-parser-bigint
TypeScript icon, indicating that this package has built-in type declarations

4.3.4 • Public • Published

socket.io-parser-bigint

CI npm version

This package extended from socket.io-parser to support bigint type.

A socket.io encoder and decoder written in JavaScript complying with version 5 of socket.io-protocol. Used by socket.io and socket.io-client.

Compatibility table:

Parser version Socket.IO server version Protocol revision
4.x 4.x 5

Parser API

socket.io-parser is the reference implementation of socket.io-protocol. Read the full API here: socket.io-protocol.

Example Usage

Replace socket.io default parser

import * as SocketIOParser from '@kim5257/socket.io-parser-bigint';
import { Server, Socket } from 'socket.io';

const server = new Server(3000, {
  parser: SocketIOParser,
});

Replace socket.io-client default parser

import * as SocketIOParser from '@kim5257/socket.io-parser-bigint';
import SocketIO from 'socket.io-client';

const client = SocketIO('http://localhost:3000', {
  parser: SocketIOParser,
});

See the test suite for more examples of how socket.io-parser is used.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @kim5257/socket.io-parser-bigint

Weekly Downloads

55

Version

4.3.4

License

MIT

Unpacked Size

26 kB

Total Files

12

Last publish

Collaborators

  • kim5257