UNPKG

react-before-leave

Version:

React component and hook which listens to `beforeunload` on the window when mounted.

69 lines (68 loc) 1.76 kB
{ "name": "react-before-leave", "version": "2.1.2", "description": "React component and hook which listens to `beforeunload` on the window when mounted.", "main": "lib/index.js", "types": "lib/index.d.ts", "files": [ "lib" ], "scripts": { "build": "rollup -c", "lint": "eslint src/", "test": "echo \"Error: no test specified\" && exit 1", "prepare": "npm run build" }, "repository": { "type": "git", "url": "git+https://github.com/LiamMartens/react-beforeunload.git" }, "keywords": [ "beforeunload", "component", "event", "hook", "onbeforeunload", "react", "unload", "window" ], "author": "Jacob Buck <buck.jacob@gmail.com>, Liam Martens <hi@liammartens.com>", "license": "MIT", "bugs": { "url": "https://github.com/LiamMartens/react-beforeunload/issues" }, "homepage": "https://github.com/LiamMartens/react-beforeunload#readme", "dependencies": { }, "peerDependencies": { "react": "^16.8.0" }, "devDependencies": { "@babel/core": "^7.4.5", "@babel/preset-env": "^7.4.5", "@babel/preset-react": "^7.0.0", "@types/react": "^16.9.23", "@types/react-router": "^5.1.4", "babel-eslint": "^10.0.2", "eslint": "^5.16.0", "eslint-config-prettier": "^4.3.0", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-react": "^7.13.0", "eslint-plugin-react-hooks": "^1.6.0", "husky": "^2.4.1", "lint-staged": "^8.2.1", "prettier": "^1.18.2", "react": "^16.13.0", "react-router": "^5.1.2", "rollup": "^1.16.2", "rollup-plugin-babel": "^4.3.3", "rollup-plugin-typescript2": "^0.26.0", "typescript": "^3.8.2" }, "husky": { "hooks": { "pre-commit": "lint-staged" } } }