Socket
Socket
Sign inDemoInstall

really-small-events

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    really-small-events

A Tiny Typescript Event Library


Version published
Weekly downloads
1.5K
decreased by-6.33%
Maintainers
1
Install size
8.64 kB
Created
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 for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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