npm.io
0.0.6 • Published 3 years ago

@steeringwaves/context

Licence
ISC
Version
0.0.6
Deps
2
Size
157 kB
Vulns
0
Weekly
0

@steeringwaves/context

workflow

A typescript context library.

Example

const Context = require("@steeringwaves/context").default;

const parent = new Context();
const child = new Context({ Parent: parentCtx });
parent.on("done", () => {
	console.log("parent done");
});

child.on("done", () => {
	console.log("child done");
});

console.log(child.Done()); // false

parent.Cancel();

console.log(child.Done()); // true