UNPKG

@conodene/usetimeout-react-hook

Version:

React.js custom hook that sets a leak-safe timeout and returns a function to cancel it before the timeout expires.

64 lines (63 loc) 1.7 kB
{ "name": "@conodene/usetimeout-react-hook", "version": "0.1.5", "description": "React.js custom hook that sets a leak-safe timeout and returns a function to cancel it before the timeout expires.", "main": "build/index.js", "module": "build/index.es.js", "jsnext:main": "build/index.es.js", "scripts": { "build": "rollup -c", "test": "jest --coverage", "prepublishOnly": "npm run build" }, "repository": { "type": "git", "url": "git+https://github.com/herksaw/usetimeout-react-hook.git" }, "files": [ "build", "README.md" ], "keywords": [ "react", "hooks", "timeout", "cancelable" ], "author": "Herks Aw <herksaw@gmail.com>", "license": "MIT", "bugs": { "url": "https://github.com/herksaw/usetimeout-react-hook/issues" }, "homepage": "https://github.com/herksaw/usetimeout-react-hook#readme", "devDependencies": { "@testing-library/react-hooks": "^1.1.0", "@types/jest": "^24.0.15", "coveralls": "^3.0.5", "jest": "^24.8.0", "react": "18.2.0", "react-dom": "18.2.0", "react-test-renderer": "^16.8.6", "rollup": "^1.17.0", "rollup-plugin-commonjs": "^10.0.1", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-peer-deps-external": "^2.2.0", "rollup-plugin-typescript2": "^0.22.0", "ts-jest": "^24.0.2", "typescript": "^4.5.3" }, "peerDependencies": { "react": "18.2.0", "react-dom": "18.2.0" }, "jest": { "preset": "ts-jest", "testEnvironment": "jsdom", "globals": { "ts-jest": { "diagnostics": false } } }, "dependencies": {} }