blazing-blossom-binder
v1.2.4
Published
A lightweight event and data-binding utility.
Downloads
4
Maintainers
Readme
Blazing Blossom Binder
A lightweight library for efficient event and data-binding management. Designed to be simple yet powerful, Blazing Blossom Binder leverages modern JavaScript libraries to offer a unique approach to handling dynamic data and events within applications.
Installation
npm install blazing-blossom-binder
Usage
const BlazingBlossomBinder = require('blazing-blossom-binder');
const binder = new BlazingBlossomBinder();
// Bind to a specific route
binder.bind('/user/:id', (data) => {
console.log(`User data: `, data);
});
// Trigger an event
binder.emit('user-update', { id: '123', name: 'Anatoliy' });
// Listen to custom events
binder.on('user-update', (data) => {
console.log(`User updated: `, data);
});
Features
- Easy event and data binding with support for pattern matching.
- Debounced event handling to improve performance.
- Lightweight dependencies for a small bundle size.
License
This project is licensed under the MIT License.