UNPKG

@daisugi/nekobasu

Version:

Nekobasu is a lightweight, easy to use, asynchronous and efficient EventBus implementation.

68 lines (46 loc) โ€ข 1.59 kB
# @daisugi/nekobasu [![version](https://img.shields.io/npm/v/@daisugi/nekobasu.svg)](https://www.npmjs.com/package/@daisugi/nekobasu) ![npm downloads](https://img.shields.io/npm/dm/@daisugi/nekobasu) [![bundlephobia](https://badgen.net/bundlephobia/minzip/@daisugi/nekobasu)](https://bundlephobia.com/result?p=@daisugi/nekobasu) This project is part of the [@daisugi](https://github.com/daisugiland/daisugi) monorepo. **Nekobasu** is a lightweight, easy to use, asynchronous and efficient EventBus implementation. ## ๐ŸŒŸ Features - ๐Ÿ’ก Minimum size [overhead](https://bundlephobia.com/result?p=@daisugi/nekobasu). - โšก๏ธ Written in TypeScript. - ๐Ÿ“ฆ Only uses trusted dependencies. - ๐Ÿ”จ Powerful and agnostic to your code. - ๐Ÿงช Well tested. - ๐Ÿค Is used in production. - โšก๏ธ Exports ES Modules as well as CommonJS. ## Usage ```js import { Nekobasu } from '@daisugi/nekobasu'; const nekobasu = new Nekobasu(); nekobasu.subscribe('foo.*', (event) => { console.log(event); }); nekobasu.dispatch('foo.bar'); ``` ## Table of contents - [@daisugi/nekobasu](#daisuginekobasu) - [๐ŸŒŸ Features](#-features) - [Usage](#usage) - [Table of contents](#-table-of-contents) - [Installation](#installation) - [Other projects](#other-projects) - [License](#license) ## Installation Using npm: ```sh npm install @daisugi/nekobasu ``` Using pnpm: ```sh pnpm install @daisugi/nekobasu ``` [:top: Back to top](#-table-of-contents) ## Other projects [Meet the ecosystem](../../README.md) [:top: Back to top](#-table-of-contents) ## License [MIT](../../LICENSE)