1.0.0 • Published 5 months ago

perfomace-booster v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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);