๐Ÿ‘€ A Node.js event emitter works in the browser

Overview

observer-emit

๐Ÿ‘€ A Node.js event emitter works in the browser.

NPM version

Install

using npm

$ npm i observer-emit

using yarn

$ yarn add observer-emit

using pnpm

$ pnpm i observer-emit

Usage

import observer from 'observer-emit'

observer.on('asuka', () => console.log('asuka', 1))
observer.on('nagi', () => console.log('nagi'))

observer.remove('asuka')
observer.on('asuka', () => console.log('asuka', 2))

observer.emit('asuka') // asuka 2
observer.emit('nagi') // nagi

observer.once('ume', () => console.log('ume'))
observer.emit('ume') // ume
observer.emit('ume')
observer.emit('ume')

License

MIT License ยฉ 2022 Akashi Sai

You might also like...

Javascript client for Sanity. Works in node.js and modern browsers (older browsers needs a Promise polyfill).

@sanity/client Javascript client for Sanity. Works in node.js and modern browsers (older browsers needs a Promise polyfill). Requirements Sanity Clien

Nov 29, 2022

UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment.

UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment.

UAParser.js JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB m

Jan 4, 2023

Examples of how to do query, style, dom, ajax, event etc like jQuery with plain javascript.

You (Might) Don't Need jQuery Frontend environments evolve rapidly nowadays and modern browsers have already implemented a great deal of DOM/BOM APIs

Dec 24, 2022

A lightweight normalized tap event

A lightweight normalized tap event

๐Ÿšซ Retired: Tappy! Per our unmaintained repository status documentation this repository is now retired and is no longer accepting issue reports or pul

Dec 9, 2022

Event scheduler is a simple app for viewing the events happening around you

Event scheduler is a simple app for viewing the events happening around you. User can also create their event and include a location. Location can also be marked as hidden(strictly by IV). Built with React and Styled Components

Mar 29, 2022

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions. (like child-processes, iframe, web worker etc).

Dec 29, 2022

๐Ÿณ๏ธโ€๐ŸŒˆ event calendar

alman-akka :rainbow-flag: event calendar Frontend The frontend of this app uses NextJS and Node 16 together with Yarn 1.x as a package manager. Develo

Mar 10, 2022

An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

CQRS Wechaty An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve

Mar 23, 2022

Real-time event collaborating

Smartlist Collaborate Collaborate on your events in real-time! An product by Smartlist ๐Ÿงช This product is still in development, and some features mig

Mar 17, 2022
Releases(v1.0.0)
Owner
Akashi
Akashi
A TypeScript friendly event emitter with easy re-emitting events

remitter A TypeScript friendly event emitter with easy re-emitting events. Install npm add remitter Usage import { Remitter } from "remitter"; interf

CRIMX 5 Dec 28, 2022
Plug-and-play, faster-than-native promise/callback event emitter

kNow Blazing-fast callback/promise-based events with a tiny footprint What is this? With kNow (pronounced "now"โ€”the k's silent), JavaScript event mana

Elijah Bodden 25 Sep 11, 2022
io-ts Typed Event Bus for the runtime of your Node.js application. A core for any event-driven architecture based app.

Typed Event Bus Based on io-ts types, this bus provides a handy interface to publish and consume events in the current runtime of the Node.js process.

Konstantin Knyazev 3 May 23, 2022
'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style(event driven architecture). For message broker, light weight Redis Stream is used and for event store, the well known NoSQL database, MongoDB, is used.

Sihoon Kim 11 Jan 4, 2023
Hacktoberfest is all about meeting up all brains. In this repository we are planning to come with many ideas and works. You all can share your ides/works here.

Hacktoberfest Submit your Work Hacktoberfest is all about meeting up all brains. In this repository we are planning to come with many ideas and works.

Chinmay Patil 3 Oct 5, 2022
Pintora is an extensible javascript text-to-diagrams library that works in both browser and Node.js.

Pintora Documentation | Live Editor Pintora is an extensible javascript text-to-diagrams library that works in both browser and Node.js. Expressing yo

hikerpig 652 Dec 30, 2022
Work around some mobile browser's 300ms delay on the click event.

jQuery fastClick plugin Work around the 300ms delay for the click event in some mobile browsers (e.g. Android and iOS). Code based on http://code.goog

Dave Hulbert 132 Jul 6, 2020
Snowfall effect written in pure JavaScript. No additional libraries, no dependencies. Works in every modern browser.

pureSnow.js Snow falling slowly on a winter night. Probably the most calming and peaceful snowfall effect written in pure JS/CSS. (No SCSS). Inspired

null 20 Dec 29, 2022
Airtable for TypeScript and JavaScript (ES7, ES6, ES5). Supports Airtable database. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

TypeAirtable is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be

Think A.M. 11 Sep 11, 2022
GetOsLocalesCrossPlatform - A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers

getOsLocalesCrossPlatform A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers This script is

null 1 Jan 2, 2022