0.0.7 • Published 4 years ago

geso v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Gitpod Ready-to-Code

geso

Global event standard output.

import { bus } from "geos"

// simple usage
bus.on(x => console.log(x));
bus.signal("sync emit");
await bus.emit("async emit");

// usage with filters
const numberBus = bus.where<number>(x => typeof x == 'number');
numberBus.on(x => console.log(x * 2));
numberBus.where(x=> x > 10).on(x => console.log("More than 10"));
numberBus.signal(4);

// nested bus 
const privBus = new Bus();
numberBus.on(x=> privBus.emit(x));
// or
numberBus.pipe(privBus);
0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago