Socket
Socket
Sign inDemoInstall

vusion-micro-data

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vusion-micro-data

used for vusion-micro


Version published
Weekly downloads
2
Maintainers
1
Install size
21.2 kB
Created
Weekly downloads
 

Readme

Source

vusion-micro-data

used for vusion-micro

usage

import { publish, subscribe, clearTopic } from 'vusion-micro-data';

publish('test', 2);
subscribe('test', (number) => {
    console.log(number === 2);
});
clearTopic('test');

api

publish

publish a topic with data, support clean data

function (topic: string, data: any): Function

const cancel = publish('test', 2);
cancel();

subscribe

subscribe a topic, support run once and cancel

function (topic: string, func: Function, once?: boolean): Function

const cancel = subscribe('test', (data) => {
    console.log(data);
}, false);
cancel();

resetTopic

reset topic queue and data

function (topic: string, isSaveData?: boolean): void

resetTopic('test', false);

clearTopic

clear topic data

function (topic: string): void

clearTopic('test');

FAQs

Last updated on 15 Apr 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc