UNPKG

@ehsaneha/react-throttle

Version:

useThrottle is a custom React hook that limits how often a function can be called by ensuring it's invoked at most once within a specified delay period.

48 lines (47 loc) 1.35 kB
{ "name": "@ehsaneha/react-throttle", "version": "1.0.3", "description": "useThrottle is a custom React hook that limits how often a function can be called by ensuring it's invoked at most once within a specified delay period.", "main": "dist/index.js", "scripts": { "build": "tsc", "test": "jest" }, "repository": { "type": "git", "url": "git+https://github.com/ehsaneha/react-throttle.git" }, "devDependencies": { "@babel/core": "^7.26.0", "@babel/preset-env": "^7.26.0", "@babel/preset-react": "^7.26.3", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@types/jest": "^30.0.0", "@types/react": "^19.0.4", "@types/react-dom": "^19.0.2", "jest": "^30.0.5", "jest-environment-jsdom": "^30.0.5", "ts-jest": "^29.4.0", "ts-node": "^10.9.2", "typescript": "^4.9.5" }, "keywords": [ "javascript", "typescript", "React", "Custom Hook", "Throttle" ], "author": "ehsaneha", "license": "MIT", "bugs": { "url": "https://github.com/ehsaneha/react-throttle/issues" }, "homepage": "https://github.com/ehsaneha/react-throttle#readme", "dependencies": {}, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }