3.0.0 · normalize once · cross every boundary

One message shape. Everywhere.

Create a predictable { type, data } envelope, serialize it to JSON, and load it again in Node.js, browsers, WebSockets, IPC, workers, or any JavaScript host.

  • 0 runtime dependencies
  • Version 3.0.0
  • Native ES modules
  • Browser global included
  • No build step
import Message from 'js-message';

const message = new Message();

message.type = 'user.updated';
message.data = {
    id: 42,
    active: true
};

socket.send(message.JSON);
A structured message crossing a glowing normalization gate between browser and server endpoints

Choose the page you need

Short routes, not one endless manual.

Each topic has a focused page, so implementation details stay close and navigation stays fast.

Build

Start in minutes

Install, create, serialize, and receive a message.

Get started →
Integrate

Know the API

See every field, method, return value, and failure mode.

Open the API →
Design

Lock the protocol

Understand valid envelopes, ignored extras, and error recovery.

Read the contract →
Verify

Audit the evidence

Review vanilla-test coverage, compatibility, and package checks.

Inspect testing →

Install

One tiny package. Nothing at runtime.

The public module uses only JavaScript and native JSON behavior. Version 3.0.0 is published on npm with zero runtime dependencies.

npm install js-message