plankee
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

plank event emitter

Smallest was nanoevents but it is 219 minified size and 138 brotlied (not 107!!!)

So why we should waste so much memory in JS?

Real original size 93 bytes
Real broitled size 81 bytes
Broitled size inside app 77 bytes

Usage:

npm i plankee
import { pee } from "plankee";

const [onLog, emitLog] = pee<[text: string]>();

const removeListener = onLog((text) => console.log("log: " + text));

emitLog("hello world!");

removeListener();

API

[subscribe, emit] = pee<[ARGUMENTS]>();

// subscribe returns disposer

Readme

Keywords

none

Package Sidebar

Install

npm i plankee

Weekly Downloads

7

Version

1.0.1

License

none

Unpacked Size

1.08 kB

Total Files

4

Last publish

Collaborators

  • morglod