@dgiot/dgiotbus
v1.0.3
Published
dgiot front-end storage middleware
Downloads
14
Readme
dgiotBus
Installation
yarn add @dgiot/dgiotBus
Usage
es module
import * as dgiotBus from '@dgiot/dgiotBus';
import dgiotBus from '@ataola/utils';
commonjs
command:
yarn init -y
yarn add esm @dgiot/dgiotBus
for example:
const dgiotBus = require('@dgiot/dgiotBus');
const dgiotBus = require('@dgiot/dgiotBus');
Use
emit
dgiotBus.$emit('busName', { name: 'h7ml' });
on
dgiotBus.$emit('busName', (res) => {
console.log(res);
});
off
dgiotBus.$bus.$off('busName');