perfomace-booster
v1.0.0
Published
This package that helps improve application speed, you need to focus on optimizing certain parts of your application that can directly influence its performance.
Maintainers
Readme
Utilities Library
This repository contains a collection of useful utility functions for JavaScript applications. These utilities can help with function throttling, debouncing, caching, lazy loading, and image optimization.
Available Utilities
1. debounce
Limits the rate at which a function can fire. Useful for handling events like resize or scroll where you want to limit how frequently a function is executed.
Usage
import { debounce } from './index.js';
const myFunction = () => {
console.log('Function executed');
};
// Create a debounced version of the function with a 300ms delay
const debouncedFunction = debounce(myFunction, 300);
// Trigger debounced function on window resize
window.addEventListener('resize', debouncedFunction);