nanoevents
Simple and tiny (107 bytes) event emitter library
Last updated a year ago by ai .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nanoevents 
SYNC missed versions from official npm registry.

Nano Events

Simple and tiny event emitter library for JavaScript.

  • Only 108 bytes (minified and brotlied). It uses Size Limit to control size.
  • The on method returns unbind function. You don’t need to save callback to variable for removeListener.
  • TypeScript and ES modules support.
  • No aliases, just emit and on methods. No Node.js EventEmitter compatibility.
import { createNanoEvents } from 'nanoevents'

const emitter = createNanoEvents()

const unbind = emitter.on('tick', volume => {
  summary += volume
})

emitter.emit('tick', 2)
summary //=> 2

unbind()
emitter.emit('tick', 2)
summary //=> 2

  Made at Evil Martians, product consulting for developer tools.


Docs

Read full docs here.

Current Tags

  • 9.1.0                                ...           latest (a year ago)

44 Versions

  • 9.1.0                                ...           a year ago
  • 9.0.0                                ...           2 years ago
  • 8.0.0                                ...           3 years ago
  • 7.0.1                                ...           4 years ago
  • 7.0.0                                ...           4 years ago
  • 6.0.2                                ...           4 years ago
  • 6.0.1                                ...           5 years ago
  • 6.0.0                                ...           5 years ago
  • 5.1.13                                ...           5 years ago
  • 5.1.12                                ...           5 years ago
  • 5.1.11                                ...           5 years ago
  • 5.1.10                                ...           5 years ago
  • 5.1.9                                ...           5 years ago
  • 5.1.8                                ...           6 years ago
  • 5.1.7                                ...           6 years ago
  • 5.1.6                                ...           6 years ago
  • 5.1.5                                ...           6 years ago
  • 5.1.4                                ...           6 years ago
  • 5.1.3                                ...           6 years ago
  • 5.1.2                                ...           6 years ago
  • 5.1.1                                ...           6 years ago
  • 5.1.0                                ...           6 years ago
  • 5.0.1                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 4.0.3                                ...           6 years ago
  • 4.0.2                                ...           6 years ago
  • 4.0.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.0                                ...           6 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.8                                ...           7 years ago
  • 1.0.7                                ...           7 years ago
  • 1.0.6                                ...           7 years ago
  • 1.0.5                                ...           8 years ago
  • 1.0.4                                ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.4.1                                ...           9 years ago
  • 0.4.0                                ...           9 years ago
  • 0.3.0                                ...           9 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |