JSPM

evnty

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16088
  • Score
    100M100P100Q133143F
  • License MIT

0-Deps, simple, fast, for browser and node js anonymous event library

Package Exports

  • evnty

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (evnty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

EVT.js

0-Deps, simple, fast, for browser and node js anonymous event library

Coverage Status Build Status NPM version Downloads Snyk

Interface

interface Event {
  on(listener: Function): Function
  once(listener: Function): Function
  off(listener: Function)
  size: Number
}

Usage

import Event from 'evt.js';

const event = new Event();

const unsubscribe = event.on(value => {
  console.log('EVENT VALUE IS', value);
});

event('test');
unsubscribe();

License

License The MIT License Copyright (c) 2019 Ivan Zakharchanka