0.0.4 • Published 3 years ago
objcast v0.0.4
import { Caster } from 'objcast';
const caster = new Caster(), // any[]
cast = () => 'abc';
caster.push(cast);
caster.cast((c: Function) => c()).then(r => {
console.log(r); // ['abc']
caster.remove(cast); // -1 = false, >= 0 = true
}); // Promise<any[]>