subnpub
Minimal implementation of publish/subscribe pattern
USAGE
const SubNPub = ;const snp = ; const fn1 = `1-Called Me with: `;const fn2 = `2-Called Me with: `;const fn3 = `3-Called Me with: `; // subscribe enforces uniquenesssnp;// or:snp;// or:snp; snp; // dispatches argument to all subscribers snp; // true snplength; // 3 snp; // removes subscriber// or:snp;// or:snp; snp; // removes all subscribers