
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
data-transport
Advanced tools
A simple and responsive transport
Many front-end communication APIs based on JavaScript are almost one-way communication, and their communication interface are often different. In terms of communication interaction protocols, we need an universal and responsive communication library that will help us communicate in any scenario very simply and easily.
And It is also very easy to mock to be used for testing, and it is also easy to design an common interface that is compatible with multiple communication APIs.
You can use data-transport to communicate between different front-end communication APIs.
data-transport is a generic and responsive communication transporter
yarn add data-transport
import { createTransport } from 'data-transport';
const external = createTransport('IFrameMain');
external.listen('hello', async (num) => ({ text: `hello ${num}` }));
import { createTransport } from 'data-transport'
const internal = createTransport('IFrameInternal');
expect(await internal.emit('hello', 42).toEqual({ text: 'hello 42' });
createTransport()
Create a transport instance by transport options.
mockPorts()
Mock ports for testing.
merge()
Merge multiple transports into one transport.
TransportMessageTransportIFrameMainTransportIFrameInternalTransportSharedWorkerClientTransportSharedWorkerInternalTransportServiceWorkerClientTransportServiceWorkerServiceTransportWorkerMainTransportWorkerInternalTransportBrowserExtensionsGenericTransportBrowserExtensionsMainTransportBrowserExtensionsClientTransportElectronMainTransportElectronRendererTransportWebRTCTransportBroadcastTransportMainProcessTransportChildProcessTransportFAQs
A simple and responsive transport
The npm package data-transport receives a total of 687 weekly downloads. As such, data-transport popularity was classified as not popular.
We found that data-transport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.