9.1.0 • Published 7 months ago

nanoevents v9.1.0

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

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.

@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/uianycablecore-typeforktabby-auth-customer-portalweq8vue-bus-parkwsclstore-unitstarter-worldthree-freeform-controlsthree-jarvisthree-freeform-controls-pluginvue-flawless-modalvideomail-client@cryptkeeperzk/providers@cyberhaven/webext-bridge-typed@cosminv6u/logux-server@darkroom.engineering/hamo@bel0v/graphite@beland/colyseus.js@canopy-pte-ltd/canopy-toolkit@payping/sdk@payping/utils@pbscript/coresse-feed@anycable/core@arconnect/webext-bridge@annotorious/core@agentflow/core@buildwithlayer/chat5d-chess-renderer@dbux/runtime@dbux/common@dbux/common-node@dbux/data@dbux/graph-common@dbux/graph-host@dbux/projectsxwmwebext-bridgeuse-optimistic-update@hakkei/dfu-handler@hakkei/webdfu@fproxy/transport-firestore@hendt/ebay-api@flussonic/flussonic-webrtc-player@electra.finance/sdk@ee-fe/msgio@garinz/webext-bridge@fudge-ai/browser@logux/client@logux/core@logux/redux@logux/server@logux/vuex@luminix/support@mycelium-ethereum/swaps-keepers@nethergames/api@nbai/nbmap-gl-drawer@nanostores/query@enkryptcom/extension-bridge@evilkiwi/hydra@evilkiwi/obs@evilkiwi/xjs@evilkiwi/embed@fanedm/colyseus.js@mjstahl/stated@mojoactive/swatches@internetarchive/lazy-loader-service@internetarchive/donation-form@internetarchive/donation-monthly-portal@israel-lpz/datepicker@khainh/crx-bridge@klevn/solid-router@i-bim/file-transfer@i-bim/model-core@i-bim/painter-core@i-bim/utils@dus/emitter@kb-sanity/proto-kb-plugin@putdotio/socket-client@redia-as/libry-universal-wayfinding-maps-sdk@recogito/annotorious-supabase@rivet-gg/plugin-colyseus-javascript
9.1.0

7 months ago

9.0.0

1 year ago

8.0.0

2 years ago

7.0.0

3 years ago

7.0.1

3 years ago

6.0.2

4 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.1.13

4 years ago

5.1.12

4 years ago

5.1.11

4 years ago

5.1.10

5 years ago

5.1.9

5 years ago

5.1.8

5 years ago

5.1.7

5 years ago

5.1.6

5 years ago

5.1.5

5 years ago

5.1.4

5 years ago

5.1.3

5 years ago

5.1.2

5 years ago

5.1.1

5 years ago

5.1.0

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

3.0.0

5 years ago

4.0.0

5 years ago

2.0.0

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

9 years ago

0.1.0

9 years ago