All Projects → behnammodi → jetemit

behnammodi / jetemit

Licence: MIT license
jetemit is an event manager for React, React Native, Vue, Angular, and all javascript project

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jetemit

micro-typed-events
The smallest, most convenient typesafe TS event emitter you'll ever need
Stars: ✭ 39 (-11.36%)
Mutual labels:  events, listener
Steam-Apps-Management-API
A basic Steam Application Management API and Valve Data Format (VDF) reader/writer.
Stars: ✭ 24 (-45.45%)
Mutual labels:  events, listener
ikisocket
🧬 WebSocket wrapper with event management for Fiber https://github.com/gofiber/fiber. Based on Fiber WebSocket and inspired by Socket.io
Stars: ✭ 92 (+109.09%)
Mutual labels:  events, listener
spa-bus
🔥Tools for multilevel components to pass values in any SPA
Stars: ✭ 15 (-65.91%)
Mutual labels:  events, listener
event-worker
A simpler way of dealing with Web Workers
Stars: ✭ 18 (-59.09%)
Mutual labels:  events, listener
DirectoryWatcher
LIstener for changes in a specified folder
Stars: ✭ 33 (-25%)
Mutual labels:  listener
events-manager-io
A basic site for managing event centers and scheduling events.
Stars: ✭ 19 (-56.82%)
Mutual labels:  events
SEPA
Get notifications about changes in your SPARQL endpoint.
Stars: ✭ 21 (-52.27%)
Mutual labels:  events
VLCTechHub-site
VLCTechHub site
Stars: ✭ 23 (-47.73%)
Mutual labels:  events
CQELight
CQELight is an entreprise grade extensible and customisable framework for creating software with CQRS, DDD & Event Sourcing patterns
Stars: ✭ 21 (-52.27%)
Mutual labels:  events
rel-events
The relevant React Events Library.
Stars: ✭ 20 (-54.55%)
Mutual labels:  events
recurring events
Elixir library for dealing with recurring events
Stars: ✭ 22 (-50%)
Mutual labels:  events
robotframework-historic
Robotframework-historic is a free, custom html report which provides historical robotframework execution results by storing execution results info in MySQL database and generate's html reports (charts / statistics) from database using Flask.
Stars: ✭ 70 (+59.09%)
Mutual labels:  listener
league-lazy-event
💤 Provides a LazyListener for use with League\Event which allows for lazy fetching of actual listeners.
Stars: ✭ 14 (-68.18%)
Mutual labels:  listener
GoblinDB
Fear the Goblin! - An amazing, simple and fun database for humans
Stars: ✭ 54 (+22.73%)
Mutual labels:  events
PSEventViewer
PSEventViewer (Get-Events) is really useful PowerShell wrapper around Get-WinEvent. One of the features you may be interested in is a simple way of getting “hidden” events data
Stars: ✭ 74 (+68.18%)
Mutual labels:  events
Hap
A simple concurrent programming language.
Stars: ✭ 19 (-56.82%)
Mutual labels:  events
NYC Taxi Pipeline
Design/Implement stream/batch architecture on NYC taxi data | #DE
Stars: ✭ 16 (-63.64%)
Mutual labels:  events
fs2-es
Event sourcing utilities for FS2
Stars: ✭ 75 (+70.45%)
Mutual labels:  events
react-compose-events
A Higher-Order Component factory to attach outside event listeners
Stars: ✭ 25 (-43.18%)
Mutual labels:  events

NPM

Version Minzipped size Downloads License

An event manager very simple

Compatibility

All browser Backend (Nodejs) Mobile (React Native)

Compatibility with all javascript project

Install

npm install jetemit

Import

const { on, emit } = require("jetemit");
//or
import { on, emit } from "jetemit";

Use

Call

import { emit } from "jetemit";

/**
 * emit(name, value);
 * name is string
 * value any
 */
emit("TIME", "2018-12-01 12:30");

Listener

import { on } from "jetemit";

/**
 * on(name,function)
 * name is string
 */
on("TIME", time => {
  console.log(time);
});
import { once } from "jetemit";

/**
 * Like on but run one time
 */
once("TIME", time => {
  console.log(time);
});

Unsubscribe listener

import { on } from "jetemit";

/**
 * on return unsubscribe function
 */
const unsubscribe = on("TIME", time => {
  console.log(time);
});

unsubscribe();

Using unsubscribeOf function

import { unsubscribeOf } from "jetemit";

/**
 * Unsubscribe all subscribed functions for TIME
 */
unsubscribeOf("TIME");

or

/**
 * Unsubscribe a Function which subscribed for TIME
 */
unsubscribeOf("TIME", timeFunction);

Refund from all listener

Please see this sample:

// file a.js
import { on } from "jetemit";

on("CACHE_STSTEM_HEALTH", () => {
  return { state: "OK", id: "CACHE_SYSTEM_1" };
});
// file b.jd
import { on } from "jetemit";

on("CACHE_STSTEM_HEALTH", () => {
  return { state: "OK", id: "CACHE_SYSTEM_2" };
});
// file c.js
import { on, emit } from "jetemit";

const status = emit("CACHE_STSTEM_HEALTH");
console.log(status);
/*
[
  { state: "OK", id: "CACHE_SYSTEM_1" },
  { state: "OK", id: "CACHE_SYSTEM_2" }
]
*/

Donate

BTC: 1NV1sjQnXwuyHgxQ8G5eWprhxsD5A8yN6r

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].