Skip to content

zuoez02/wait-finish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wait-finish

listen and excute event, whatever which called first.

Usage

Run the demo in test.js.

Listen

// 1. callback
const { wait } = require('wait-finish');
wait('eventName', (result) => console.log(result));
// 2. promise
const { wait } = require('wait-finish');
wait('eventName').then((result) => console.log((result)));

Finish

const { finish } = require('finish');

finish('eventName', 'Hello World');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published