9.0.0 • Published 4 months ago

nanoevents v9.0.0

Weekly downloads
20,760
License
MIT
Repository
github
Last release
4 months ago

Nano Events

Simple and tiny event emitter library for JavaScript.

  • Only 107 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

Docs

Read full docs here.

@mindbox/frontendvuex-logux@renito/shared@evilkiwi/hydra-streamlabs@evilkiwi/hydra-streamlabs-desktop@tnotifier/xjs@tnotifier/embed@tnotifier/hydra-streamlabs@tnotifier/hydra-streamlabs-desktop@tnotifier/obsaditya-super-sdk@infinitebrahmanuniverse/nolb-nan@annotorious/supabase@everything-registry/sub-chunk-2244@supertray/app-i18n@supertray/app-services@supertray/app-utils@supertray/uihistree-webext-bridgegosling.jsleast-recentlogux-serverlogux-server-nextlogux-clientlogux-corelogux-sync@logux/servermsgiohlviewer.jsmantle-webnanotweennanuxeditrondynamic-styleguideeq15electron-ipc-socketgpt-helpsfedereroncillaqueue-teareact-native-feed-media-audio-playerreact-falcorreact-head-tagsreact-state-controllerpayping-sdkreact-dayoreact-instrumentsaga-componentssdfsdnbmap-gl-drawer@hakkei/dfu-handler@hakkei/webdfu@electra.finance/sdk@enkryptcom/extension-bridge@evilkiwi/hydra@evilkiwi/obs@evilkiwi/xjs@evilkiwi/embed@hendt/ebay-api@fproxy/transport-firestore@fudge-ai/browser@fanedm/colyseus.js@i-bim/painter-core@i-bim/utils@i-bim/file-transfer@i-bim/model-core@garinz/webext-bridge@flussonic/flussonic-webrtc-player@israel-lpz/datepickervue-bus-parkvue-flawless-modal@internetarchive/donation-form@internetarchive/lazy-loader-service@kb-sanity/proto-kb-plugin@khainh/crx-bridge@mjstahl/stated@klevn/solid-routerweq8xwmwebext-bridgeuse-optimistic-updatethree-jarvisthree-freeform-controlsthree-freeform-controls-plugin@nethergames/api@logux/vuex@logux/client@logux/core@logux/redux@nanostores/query@nbai/nbmap-gl-drawerwscl@dus/emitter@ee-fe/msgioshadowformtabby-auth-customer-portalstore-unitresources-coroutetouillereact-svg-atlasreddit-watcher
9.0.0

4 months ago

8.0.0

9 months ago

7.0.0

2 years ago

7.0.1

2 years ago

6.0.2

2 years ago

6.0.1

3 years ago

6.0.0

3 years ago

5.1.13

3 years ago

5.1.12

3 years ago

5.1.11

3 years ago

5.1.10

3 years ago

5.1.9

3 years ago

5.1.8

4 years ago

5.1.7

4 years ago

5.1.6

4 years ago

5.1.5

4 years ago

5.1.4

4 years ago

5.1.3

4 years ago

5.1.2

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

3.0.0

4 years ago

4.0.0

4 years ago

2.0.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

8 years ago

0.1.0

8 years ago