{"_id":"@avatijs/throttle","_rev":"1-4a28788d9d2e0ce636207c401dccbc31","name":"@avatijs/throttle","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@avatijs/throttle","version":"0.1.1","keywords":["avati","typescript","debounce","debouncer","throttle","throttling","delay","function control","rate limit","rate limiting","utility","helper","JavaScript","timing","event handling","event control","performance","optimization","function delay","input control","API calls"],"author":{"url":"https://khaled.ee/","name":"Khaled Sameer","email":"khaled.smq@hotmail.com"},"license":"MIT","_id":"@avatijs/throttle@0.1.1","maintainers":[{"name":"khaledsqm","email":"khaled.smq@hotmail.com"}],"homepage":"https://avati.io/","bugs":{"url":"https://github.com/KhaledSMQ/avati/issues","email":"khaled.smq@hotmail.com"},"dist":{"shasum":"790e1bc71f8bc8e3430c27268cb2bd63bef441e3","tarball":"https://registry.npmjs.org/@avatijs/throttle/-/throttle-0.1.1.tgz","fileCount":13,"integrity":"sha512-auIyrC1aZi7DhbozBdgVXaQF/0i1QdyKC1aZucHIwkpxX5VQMBxYj++Tv2vs2wQZhjzFfrki1dFZYn9NFWMXnw==","signatures":[{"sig":"MEQCICjM7T5o/nCDEMtXIjxVVc9AcXy1vg3R+CY74FRbMKWNAiAGlE0J8wgiwjJbMFudJJ/KWLLeOGM4XqxzBs9JQBwXtw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64938},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","unpkg":"./dist/umd/index.min.js","module":"./dist/esm/index.js","browser":"./dist/umd/index.js","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","default":"./dist/umd/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"c75b9a02559531f2bf2673359aa0dcf919ee3471","scripts":{"size":"webpack --mode production --json > stats.json && webpack-bundle-analyzer stats.json","test":"jest","build":"npm run clean && npm run build:types && npm run build:prod","clean":"rimraf dist","watch":"webpack --mode=development --watch","analyze":"npm run analyze:size && npm run analyze:deps && npm run analyze:duplicates","build:dev":"webpack --mode development --progress","typecheck":"tsc --noEmit","build:prod":"webpack --mode production --progress","size:check":"bundlesize","size:watch":"bundlesize --watch","analyze:why":"webpack --mode production --display-reasons","build:types":"tsc --emitDeclarationOnly --outDir dist/types","analyze:deps":"madge --circular --extensions ts ./src/index.ts","analyze:full":"webpack --mode production --stats detailed","analyze:size":"webpack --mode production --json > stats.json && webpack-bundle-analyzer stats.json","analyze:tree":"webpack --mode production --display-used-exports","watch:silent":"webpack --mode=development --watch --silent","prepublishOnly":"npm run build","analyze:modules":"webpack --mode production --display-modules","analyze:detailed":"webpack --config webpack.analysis.config.js","size:compression":"bundlesize --compression","analyze:duplicates":"jscpd src"},"_npmUser":{"name":"khaledsqm","email":"khaled.smq@hotmail.com"},"jsdelivr":"./dist/umd/index.min.js","bundlesize":[{"path":"./dist/esm/index.js","maxSize":"3 kB","compression":"brotli"},{"path":"./dist/cjs/index.js","maxSize":"3 kB","compression":"brotli"},{"path":"./dist/umd/*.js","maxSize":"3 kB","compression":"brotli"}],"repository":{"url":"git+https://github.com/KhaledSMQ/avati.git","type":"git","directory":"packages/throttle"},"_npmVersion":"10.9.0","description":"Throttle package part of Avati project","directories":{},"sideEffects":false,"_nodeVersion":"20.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jscpd":"^4.0.5","madge":"^8.0.0","eslint":"^8.57.1","rimraf":"^6.0.1","ts-jest":"^29.2.5","webpack":"^5.96.1","ts-loader":"^9.5.1","bundlesize":"^0.18.2","typescript":"^5.6.3","@types/jest":"^29.5.14","@types/node":"^22.9.1","webpack-cli":"^5.1.4","dependency-cruiser":"^16.6.0","source-map-explorer":"^2.5.3","terser-webpack-plugin":"^5.3.10","webpack-bundle-analyzer":"^4.10.2","@typescript-eslint/parser":"^8.15.0","@typescript-eslint/eslint-plugin":"^8.15.0"},"_npmOperationalInternal":{"tmp":"tmp/throttle_0.1.1_1732138101942_0.5183337927018603","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@avatijs/throttle","version":"0.1.2","description":"Throttle package part of Avati project","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","browser":"./dist/umd/index.js","unpkg":"./dist/umd/index.min.js","jsdelivr":"./dist/umd/index.min.js","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js","default":"./dist/umd/index.js"},"./package.json":"./package.json"},"sideEffects":false,"engines":{"node":">=18.20.5"},"bundlesize":[{"path":"./dist/esm/index.js","maxSize":"3 kB","compression":"brotli"},{"path":"./dist/cjs/index.js","maxSize":"3 kB","compression":"brotli"},{"path":"./dist/umd/*.js","maxSize":"3 kB","compression":"brotli"}],"scripts":{"build":"npm run clean && npm run build:types && npm run build:prod","build:dev":"webpack --mode development --progress","build:prod":"webpack --mode production","build:types":"tsc --emitDeclarationOnly","watch":"webpack --mode=development --watch","watch:silent":"webpack --mode=development --watch --silent","clean":"rimraf dist","prepublishOnly":"npm run build","test":"jest --config jest.config.js","typecheck":"tsc --noEmit","size":"webpack --mode production --json > stats.json && webpack-bundle-analyzer stats.json","analyze:deps":"madge --circular --extensions ts ./src/index.ts","size:check":"bundlesize","size:watch":"bundlesize --watch","size:compression":"bundlesize --compression","check-deps":"depcheck --config .depcheckrc","analyze":"npm run analyze:size && npm run analyze:deps && npm run analyze:duplicates","analyze:size":"webpack --mode production --json > stats.json && webpack-bundle-analyzer stats.json","analyze:detailed":"webpack --config webpack.analysis.config.js","analyze:duplicates":"jscpd src","analyze:why":"webpack --mode production --display-reasons","analyze:tree":"webpack --mode production --display-used-exports","analyze:modules":"webpack --mode production --display-modules","analyze:full":"webpack --mode production --stats detailed"},"author":{"name":"Khaled Sameer","email":"khaled.smq@hotmail.com","url":"https://khaled.ee/"},"homepage":"https://avati.io/","bugs":{"url":"https://github.com/KhaledSMQ/avati/issues","email":"khaled.smq@hotmail.com"},"repository":{"type":"git","url":"git+https://github.com/KhaledSMQ/avati.git","directory":"packages/throttle"},"license":"MIT","publishConfig":{"access":"public"},"keywords":["avati","scheduler","batch","task-queue","priority-queue","async","typescript","debounce","debouncer","throttle","throttling","delay","function control","rate limit","rate limiting","utility","helper","JavaScript","timing","event handling","event control","performance","optimization","function delay","input control","API calls"],"devDependencies":{"@types/jest":"^29.5.14","@types/node":"^22.9.1","@typescript-eslint/eslint-plugin":"^8.15.0","@typescript-eslint/parser":"^8.15.0","bundlesize":"^0.18.2","depcheck":"^1.4.7","dependency-cruiser":"^16.6.0","eslint":"^8.57.1","jest":"^29.7.0","jscpd":"^4.0.5","madge":"^8.0.0","rimraf":"^6.0.1","source-map-explorer":"^2.5.3","terser-webpack-plugin":"^5.3.10","ts-jest":"^29.2.5","ts-loader":"^9.5.1","typescript":"^5.6.3","webpack":"^5.96.1","webpack-bundle-analyzer":"^4.10.2","webpack-cli":"^5.1.4"},"_id":"@avatijs/throttle@0.1.2","gitHead":"45902cf3fc3c657b7e7d4055600c78870d4dbabb","_nodeVersion":"20.14.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-22FRbBS2b6F+iHICrC3FJZYeSNGJM2VAqeX3c6xkLDhp/xkNL3AsWPQQrMbwnWmpc9nsALhrs03C8XctKPyv3w==","shasum":"0eec307f4894f7ae4d97bad514931e6b66d08813","tarball":"https://registry.npmjs.org/@avatijs/throttle/-/throttle-0.1.2.tgz","fileCount":19,"unpackedSize":116899,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICpxEtvdVfys+6J1EdoCXBHTsclvR2ZehuyxQ9oxy2RIAiEAzTLFjQSqsgLoMkkigtMfpaK2anr20l/dvsSprbTL/OM="}]},"_npmUser":{"name":"khaledsqm","email":"khaled.smq@hotmail.com"},"directories":{},"maintainers":[{"name":"khaledsqm","email":"khaled.smq@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/throttle_0.1.2_1732354562563_0.2981105236158945"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-20T21:28:21.844Z","modified":"2024-11-23T09:36:02.990Z","0.1.1":"2024-11-20T21:28:22.160Z","0.1.2":"2024-11-23T09:36:02.776Z"},"bugs":{"url":"https://github.com/KhaledSMQ/avati/issues","email":"khaled.smq@hotmail.com"},"author":{"name":"Khaled Sameer","email":"khaled.smq@hotmail.com","url":"https://khaled.ee/"},"license":"MIT","homepage":"https://avati.io/","keywords":["avati","scheduler","batch","task-queue","priority-queue","async","typescript","debounce","debouncer","throttle","throttling","delay","function control","rate limit","rate limiting","utility","helper","JavaScript","timing","event handling","event control","performance","optimization","function delay","input control","API calls"],"repository":{"type":"git","url":"git+https://github.com/KhaledSMQ/avati.git","directory":"packages/throttle"},"description":"Throttle package part of Avati project","maintainers":[{"name":"khaledsqm","email":"khaled.smq@hotmail.com"}],"readme":"# Throttle Function\n\nA versatile and robust throttle function implemented in TypeScript, designed to limit the rate at which a function can be invoked. Ideal for optimizing performance-critical tasks like event handling, API calls, and more.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Importing the Function](#importing-the-function)\n  - [Basic Example](#basic-example)\n  - [Throttling a Custom Function](#throttling-a-custom-function)\n- [API](#api)\n  - [`throttle`](#throttle)\n- [Methods](#methods)\n  - [`cancel`](#cancel)\n  - [`flush`](#flush)\n- [Best Use Cases](#best-use-cases)\n- [When to Avoid](#when-to-avoid)\n- [Error Handling](#error-handling)\n- [Testing](#testing)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n\n## Features\n\n- **Generic Function Support**: Can throttle any function, not limited to event handlers.\n- **Configurable Leading and Trailing Invocations**: Control whether the function is invoked at the start and/or end of the throttle period.\n- **Error Handling**: Customizable error handling with an `onError` callback.\n- **Additional Control Methods**: `cancel` and `flush` methods to manage pending invocations.\n- **Environment-Agnostic**: Compatible with both browser and Node.js environments.\n- **TypeScript Support**: Strong typing ensures type safety and better developer experience.\n- **Comprehensive Testing**: Ensures reliability and correctness across various scenarios.\n\n## Installation\n\nYou can install the throttle function via npm or yarn:\n\n```bash\nnpm install @avatijs/throttle\n# or\nyarn add @avati/throttle\n```\n\nAlternatively, you can directly include the `throttle.ts` file in your project.\n\n## Usage\n\n### Importing the Function\n\n```typescript\nimport { throttle } from '@avatijs/throttle';  // ES6 import\n// or\n<script src=\"path/to/throttle.js\"></script>  // Browser usage\n```\n\n### Basic Example\n\nThrottling a window resize event:\n\n```typescript\nconst handleResize = (event: Event) => {\n    console.log('Window resized:', event);\n};\n\nconst throttledResize = throttle(handleResize, 300, {\n    leading: true,\n    trailing: true,\n    onError: (error) => console.error('Throttle error:', error),\n});\n\n// Add the throttled event listener\nwindow.addEventListener('resize', throttledResize);\n\n// To remove and cancel:\nwindow.removeEventListener('resize', throttledResize);\nthrottledResize.cancel();\n\n// To immediately invoke pending execution:\nthrottledResize.flush();\n```\n\n### Throttling a Custom Function\n\n```typescript\nconst fetchData = async (query: string) => {\n    const response = await fetch(`https://api.example.com/data?q=${query}`);\n    const data = await response.json();\n    console.log('Fetched data:', data);\n};\n\nconst throttledFetchData = throttle(fetchData, 500, {\n    leading: true,\n    trailing: false,\n    onError: (error) => console.error('Fetch error:', error),\n});\n\nthrottledFetchData('react');\nthrottledFetchData('redux');\n// Only the first call within 500ms will be executed\n```\n\n## API\n\n### `throttle`\n\nCreates a throttled version of the provided function that only invokes the function at most once every `limit` milliseconds.\n\n#### Type Definition\n\n```typescript\ntype ThrottleOptions = {\n    leading?: boolean;\n    trailing?: boolean;\n    onError?: (error: any) => void;\n};\n\ntype ThrottledFunction<T extends (...args: any[]) => any> = ((...args: Parameters<T>) => void) & {\n    cancel: () => void;\n    flush: () => void;\n};\n\nfunction throttle<T extends (...args: any[]) => any>(\n    callback: T,\n    limit?: number,\n    options?: ThrottleOptions\n): ThrottledFunction<T>;\n```\n\n#### Parameters\n\n- `callback` (`T`): The function to throttle.\n- `limit` (`number`, optional): The time interval in milliseconds to throttle executions to. Defaults to `250` ms.\n- `options` (`ThrottleOptions`, optional):\n    - `leading` (`boolean`, default `true`): Specify if the function should be invoked on the leading edge of the timeout.\n    - `trailing` (`boolean`, default `true`): Specify if the function should be invoked on the trailing edge of the timeout.\n    - `onError` (`(error: any) => void`, optional): Callback to handle errors thrown by the throttled function.\n\n#### Returns\n\nA throttled version of the input function with additional methods:\n\n- `cancel()`: Cancels any pending executions and resets the throttle state.\n- `flush()`: Immediately invokes the pending execution of the throttled function.\n\n## Methods\n\n### `cancel`\n\nCancels any pending executions and resets the throttle state.\n\n#### Usage\n\n```typescript\nthrottledFunction.cancel();\n```\n\n### `flush`\n\nImmediately invokes the pending execution of the throttled function.\n\n#### Usage\n\n```typescript\nthrottledFunction.flush();\n```\n\n## Best Use Cases\n\nThrottling is an excellent technique to optimize performance by limiting the frequency of function executions. Here are some ideal scenarios where using the throttle function can be highly beneficial:\n\n### 1. **Event Handling**\n\n- **Scroll Events**: Handling scroll events can be performance-intensive, especially when updating UI elements based on scroll position. Throttling ensures the handler executes at manageable intervals.\n\n  ```typescript\n  const handleScroll = () => {\n      console.log('Scrolling...');\n  };\n  \n  const throttledScroll = throttle(handleScroll, 200);\n  window.addEventListener('scroll', throttledScroll);\n  ```\n\n- **Resize Events**: Similar to scroll events, window resize events can trigger numerous rapid executions. Throttling helps in updating layout or performing calculations efficiently.\n\n  ```typescript\n  const handleResize = () => {\n      console.log('Window resized');\n  };\n  \n  const throttledResize = throttle(handleResize, 300);\n  window.addEventListener('resize', throttledResize);\n  ```\n\n### 2. **API Calls**\n\n- **Search Input**: When implementing a search-as-you-type feature, throttling API calls prevents overwhelming the server with requests for every keystroke.\n\n  ```typescript\n  const search = (query: string) => {\n      fetch(`/api/search?q=${query}`)\n          .then(response => response.json())\n          .then(data => console.log(data));\n  };\n  \n  const throttledSearch = throttle(search, 500);\n  \n  const handleInput = (event: Event) => {\n      const input = event.target as HTMLInputElement;\n      throttledSearch(input.value);\n  };\n  \n  const searchInput = document.getElementById('search') as HTMLInputElement;\n  searchInput.addEventListener('input', handleInput);\n  ```\n\n### 3. **Animations and Transitions**\n\n- **Scroll-Based Animations**: Throttling can be used to control the frequency of animation updates based on scroll position, ensuring smooth performance without unnecessary computations.\n\n  ```typescript\n  const animateOnScroll = () => {\n      // Animation logic\n  };\n  \n  const throttledAnimate = throttle(animateOnScroll, 100);\n  window.addEventListener('scroll', throttledAnimate);\n  ```\n\n### 4. **Button Clicks**\n\n- **Preventing Rapid Clicks**: Throttling button click handlers can prevent multiple rapid submissions or unintended repeated actions.\n\n  ```typescript\n  const handleClick = () => {\n      console.log('Button clicked');\n  };\n  \n  const throttledClick = throttle(handleClick, 1000, { leading: true, trailing: false });\n  const button = document.getElementById('submit-btn') as HTMLButtonElement;\n  button.addEventListener('click', throttledClick);\n  ```\n\n### 5. **Logging and Analytics**\n\n- **Performance Monitoring**: Throttling logging functions ensures that performance metrics or user interactions are recorded without affecting application performance.\n\n  ```typescript\n  const logEvent = (event: string) => {\n      console.log(`Event: ${event}`);\n  };\n  \n  const throttledLog = throttle(logEvent, 1000);\n  \n  const trackUserAction = (action: string) => {\n      throttledLog(action);\n  };\n  \n  // Example usage\n  trackUserAction('click');\n  trackUserAction('scroll');\n  ```\n\n## When to Avoid\n\nWhile throttling is a powerful tool for optimizing performance, it's not always the appropriate choice. Here are some scenarios where using throttling might be counterproductive or unnecessary:\n\n### 1. **Immediate Execution Required**\n\n- **Critical Actions**: If a function needs to execute immediately and reliably every time an event occurs, throttling can introduce unwanted delays or missed executions.\n\n  **Example**: Real-time form validation where each input needs to be validated instantly.\n\n  ```typescript\n  const validateInput = (input: string) => {\n      // Validation logic\n  };\n  \n  // Avoid throttling\n  const handleInput = (event: Event) => {\n      const input = event.target as HTMLInputElement;\n      validateInput(input.value);\n  };\n  \n  inputElement.addEventListener('input', handleInput);\n  ```\n\n### 2. **Non-Performance-Critical Functions**\n\n- **Simple Logic**: For functions that are lightweight and don't impact performance, throttling adds unnecessary complexity without significant benefits.\n\n  **Example**: Updating a non-visual counter or simple state updates.\n\n  ```typescript\n  let counter = 0;\n  \n  const incrementCounter = () => {\n      counter += 1;\n      console.log(counter);\n  };\n  \n  // No need to throttle\n  button.addEventListener('click', incrementCounter);\n  ```\n\n### 3. **Debounce Requirements**\n\n- **Waiting for Inactivity**: If the desired behavior is to execute a function only after a period of inactivity (e.g., waiting for the user to stop typing), debouncing is more appropriate than throttling.\n\n  **Example**: Autocomplete search where the search is triggered only after the user stops typing.\n\n  ```typescript\n  const debounce = (func: Function, wait: number) => { /* debounce implementation */ };\n  \n  const search = (query: string) => {\n      // Search logic\n  };\n  \n  const debouncedSearch = debounce(search, 300);\n  \n  const handleInput = (event: Event) => {\n      const input = event.target as HTMLInputElement;\n      debouncedSearch(input.value);\n  };\n  \n  inputElement.addEventListener('input', handleInput);\n  ```\n\n### 4. **Sequential Dependencies**\n\n- **Dependent Operations**: When function executions depend on the completion of previous calls, throttling can disrupt the sequence and lead to inconsistent states.\n\n  **Example**: Sequential data processing where each step relies on the previous one.\n\n  ```typescript\n  const processData = async (data: any) => {\n      // Processing logic\n  };\n  \n  // Avoid throttling\n  const handleData = (data: any) => {\n      processData(data);\n  };\n  \n  dataEmitter.on('data', handleData);\n  ```\n\n### 5. **Single-Execution Functions**\n\n- **One-Time Actions**: For functions that are intended to execute only once (e.g., initialization tasks), throttling is unnecessary.\n\n  **Example**: Initializing a third-party library on page load.\n\n  ```typescript\n  const initializeLibrary = () => {\n      // Initialization logic\n  };\n  \n  // No need to throttle\n  window.addEventListener('load', initializeLibrary);\n  ```\n\n### 6. **High-Frequency Data Streams**\n\n- **Data Integrity**: In scenarios where every piece of data is crucial (e.g., financial transactions, real-time data feeds), throttling can result in loss of important information.\n\n  **Example**: Processing real-time stock price updates where each update is significant.\n\n  ```typescript\n  const handleStockUpdate = (price: number) => {\n      console.log(`New price: ${price}`);\n  };\n  \n  // Avoid throttling\n  stockPriceEmitter.on('update', handleStockUpdate);\n  ```\n\n## Error Handling\n\nErrors thrown by the throttled function are caught and can be handled using the `onError` option. If `onError` is not provided, errors will be rethrown.\n\n### Example\n\n```typescript\nconst handleClick = () => {\n    throw new Error('Test error');\n};\n\nconst throttledClick = throttle(handleClick, 1000, {\n    onError: (error) => console.error('Throttle error:', error),\n});\n\nthrottledClick(); // Logs: Throttle error: Error: Test error\n```\n## Recommended Limits\n\nThe best limit for a throttle function depends on the specific use case and the desired balance between responsiveness and performance.\n\n### 1. **Frequent UI Events (e.g., `scroll`, `mousemove`, `resize`)**\n- **Recommended Limit:** `36ms - 100ms`\n- **Why:** These events can fire dozens of times per second. Throttling to 50-100ms reduces the number of function calls while maintaining smooth user experience.\n\n### 2. **Input Fields (e.g., `keyup`, `input`)**\n- **Recommended Limit:** `300ms - 500ms`\n- **Why:** When users type, you typically want to update suggestions, validate input, or perform searches without lag. A slightly higher limit allows you to reduce the load on your system while still responding in near real-time.\n\n### 3. **API Calls (e.g., Search Suggestions, Autosave)**\n- **Recommended Limit:** `500ms - 1000ms`\n- **Why:** These operations are often more resource-intensive, and limiting them reduces the load on your backend while providing timely feedback.\n\n### 4. **Animation/Rendering (e.g., game loops or dynamic canvas updates)**\n- **Recommended Limit:** `16ms`\n- **Why:** This is equivalent to ~60fps, the standard for smooth animations. If performance is a concern, consider using `requestAnimationFrame` instead.\n\n### 5. **Debounced-like Scenarios (where minimal calls are preferred)**\n- **Recommended Limit:** `1000ms` or more\n- **Why:** In situations like window resize or orientation change, you may only need updates occasionally to prevent excessive calculations.\n\n### Choosing the Right Limit:\n- **Test and Adjust:** Start with a conservative value and adjust based on user feedback and performance metrics.\n- **Device Capabilities:** On slower devices, increase the limit to prevent performance issues.\n- **Event Type:** Match the limit to the event’s natural frequency.\n\nWould you like help implementing a throttle function with a specific limit?\n\n\n___\n\n## Changelog\n\nPlease see [CHANGELOG](./CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nI welcome contributions from developers of all experience levels. If you have an idea, found a bug, or want to improve something, I encourage you to get involved!\n\n### How to Contribute\n1. Read [Contributing Guide](https://github.com/KhaledSMQ/avati/blob/master/Contributing.md) for details on how to get started.\n2. Fork the repository and make your changes.\n3. Submit a pull request, and we’ll review it as soon as possible.\n\n## License\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/KhaledSMQ/avati/blob/master/LICENSE)\n\nAvati is open-source and distributed under the [MIT License](https://github.com/KhaledSMQ/avati/blob/master/LICENSE).\n\n---\n<div align=\"center\">\n\n[![Follow on Twitter](https://img.shields.io/twitter/follow/KhaledSMQ.svg?style=social)](https://x.com/khaledsmq_)\n[![Follow on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue.svg)](https://www.linkedin.com/in/khaledsmq/)\n[![Follow on Medium](https://img.shields.io/badge/Medium-Follow-black.svg)](https://medium.com/@khaled.smq)\n[![Made with ❤️](https://img.shields.io/badge/Made%20with-❤️-red.svg)](https://github.com/KhaledSMQ)\n[![Star on GitHub](https://img.shields.io/github/stars/KhaledSMQ/avati.svg?style=social)](https://github.com/KhaledSMQ/avati/stargazers)\n[![Follow on GitHub](https://img.shields.io/github/followers/KhaledSMQ.svg?style=social&label=Follow)](https://github.com/KhaledSMQ)\n\n</div>\n","readmeFilename":"README.md"}