1.0.6 • Published 2 years ago

atom-pubsub v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago
const pubsub = require("atom-pubsub").pubsub;
// Or ES
import { pubsub } from "atom-pubsub";

const id1 = pubsub.subscribe("hello-world", (data) => {
  console.log(`hello ${data} from A`);
});
const id2 = pubsub.subscribe("hello-world", (data) => {
  console.log(`hello ${data} from B`);
});
pubsub.publish("hello-world", "Tomson");
pubsub.unsubscribe(id1);
pubsub.publish("hello-world", "James");
pubsub.unsubscribe(id2);
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago