Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

really-small-events

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

really-small-events

A Tiny Typescript Event Library

    1.1.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
870
increased by3.08%

Weekly downloads

Readme

Source

really-small-events

A Tiny Typescript Event Library

Just over 300 bytes gzipped. :)

Installation

npm i really-small-events --save

Usage

Typescript / Babel

import { RSE } from "really-small-events";

NodeJS

const RSE = require("really-small-events").RSE;

API

Listen for events

const runThisFunc = (as, many, args, as, I, want) => { console.log("Hello, world!"); }; // Listen for Event RSE.on("someEvent", runThisFunc) // Trigger event anywhere in your app RSE.trigger("someEvent", the, args, to, pass, to, the, event); // Remove listener RSE.off("someEvent", runThisFunc);

Keywords

FAQs

Last updated on 05 Dec 2017

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc