Skip to content

About

Socket.IO parser based on the `devalue` package

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

socket.io-parser

Build Status

A fork of the default socket.io encoder and decoder, which uses devalue over the vanilla JSON object, for stringifying and parsing JavaScript objects. This offers many improvements over the default parser, such as support for dates, maps, sets, regular expressions, undefined, custom classes and more. Check out devalue for details.

Usage

Server

import * as parser from "@socket.io/devalue-parser";
import { Server } from "socket.io";

const io = new Server({
  parser
});

Client

import * as parser from "@socket.io/devalue-parser";
import { io } from "socket.io-client";

const socket = io({
  parser
});

License

MIT

About

Socket.IO parser based on the `devalue` package

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages