Skip to content

Aseminaunz/merge-callbacks

Repository files navigation

merge-callbacks

Merge multiple callback functions into a single function that calls all of them in sequence.

npm

import mergeCallbacks from 'merge-callbacks'

const callback1 = (x: number) => console.log('First:', x)
const callback2 = (x: number) => console.log('Second:', x)

const combined = mergeCallbacks([callback1, callback2])
combined(42); // Logs "First: 42" followed by "Second: 42"

About

Merge multiple callback functions into a single function that calls all of them in sequence.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors