🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

yeventemitter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yeventemitter

简单的订阅发布模式

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

install

@npm: npm install YEventEmitter -S

@yarn: yarn add YEventEmitter

Quick

import YEventEmitter from 'YEventEmitter';

const yEventEmitter = new YEventEmitter();

yEventEmitter.on('start', (...args) => {
  console.log('start', ...args);
});

yEventEmitter.once('once', (...args) => {
  console.log('once', ...args);
});

yEventEmitter.emit('start', 'hello', 'world');
yEventEmitter.emit('once', 'hello', 'world');

yEventEmitter.off('start');

FAQs

Package last updated on 19 Aug 2019

Did you know?

Socket

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