busa

0.0.3 • Public • Published

A Busa is a silly mustache that makes its wearer especially opinionated and unreasonable.

Example

/**
 * This will fire handle off on window load.
 * If an error is encountered before the handle
 * is removed and will not fire.
 */
import bus from "busa";

function handle(props) {
  console.log(props.msg);
}

bus.on("window:load", handle);

window.addEventListener("load", function(event) {
  bus.emit("window:load", { msg: "Done loading", event });
});

window.addEventListener("error", function(event) {
  bus.off("window:load", handle);
});

Readme

Keywords

none

Package Sidebar

Install

npm i busa

Weekly Downloads

1

Version

0.0.3

License

none

Unpacked Size

2.46 kB

Total Files

4

Last publish

Collaborators

  • minieggs40