@toruslabs/secure-pub-sub
| Install | |
|---|---|
npm install @toruslabs/secure-pub-sub |
|
| Latest Version: | 4.3.0 |
| License: | MIT |
| Last Updated: | Mar 20, 2026 |
| Links: | npm |
secure-pub-sub
Introduction
This repo allow you to publish and subscribe to a single message in a topic
Features
- Typescript compatible. Includes Type definitions
- All API's return
Promises
Installation
Bundling
This module is distributed in 3 formats
lib.esmbuilddist/lib.esm/index.jsin es6 formatlib.cjsbuilddist/lib.cjs/index.jsin es5 format
By default, the appropriate format is used for your specified usecase You can use a different format (if you know what you're doing) by referencing the correct file
The cjs build is not polyfilled with core-js. It is upto the user to polyfill based on the browserlist they target
Directly in Browser
CDN's serve the non-core-js polyfilled version by default. You can use a different
jsdeliver
<script src="https://cdn.jsdelivr.net/npm/@toruslabs/secure-pub-sub"></script>
unpkg
<script src="https://unpkg.com/@toruslabs/secure-pub-sub"></script>
Tips for NUXT
This is a plugin that works only on the client side. So please register it as a ssr-free plugin.
Usage
Add @toruslabs/secure-pub-sub to your project:
To allow your web app to retrieve keys:
Install the package
npm i @toruslabs/secure-pub-sub
or
yarn add @toruslabs/secure-pub-sub
Requirements
- This package requires a peer dependency of
@babel/runtime - Node 22+
Version History
| Version | Released | License |
|---|---|---|
| 4.3.0 | MIT | |
| 4.2.0 | MIT | |
| 4.1.0 | MIT | |
| 4.0.0 | MIT | |
| 3.0.2 | MIT | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.0.0 | MIT | |
| 1.1.0 | MIT | |
| 1.0.0 | MIT | |
| 0.2.0 | MIT | |
| 0.1.0 | MIT | |
| 0.0.1 | MIT |
