UNPKG

@preact-hooks/instance

Version:

A custom Preact Hook that provides a sensible alternative to useRef for storing instance variables.

74 lines (73 loc) 2.12 kB
{ "name": "@preact-hooks/instance", "version": "1.0.6", "description": "A custom Preact Hook that provides a sensible alternative to useRef for storing instance variables.", "main": "dist/hook.umd.js", "module": "dist/hook.modern.js", "unpkg": "dist/hook.umd.js", "types": "types/index.d.ts", "license": "MIT", "author": "Rahim Alwer <rahim_alwer@hotmail.com>", "engines": { "node": ">= 8" }, "browserslist": [ "> 1%", "last 2 versions", "not dead" ], "homepage": "https://github.com/mihar-22/preact-hooks-instance#readme", "repository": { "type": "git", "url": "https://github.com/mihar-22/preact-hooks-instance" }, "bugs": { "url": "https://github.com/mihar-22/preact-hooks-instance/issues" }, "keywords": [ "instance", "preact-hooks", "preact", "hooks", "use-ref" ], "files": [ "dist", "types/index.d.ts" ], "scripts": { "toc": "doctoc README.md", "lint": "standard --parser babel-eslint --fix --env jest", "clean": "rimraf dist", "build": "microbundle src/index.js --name useInstance --sourcemap false --compress --globals preact/hooks=preactHooks -f modern,umd", "test": "jest src/__tests__", "test:watch": "yarn test --watch", "test:update": "yarn test --updateSnapshot --coverage", "setup": "yarn && yarn validate", "validate": "yarn lint && yarn test && yarn clean && yarn build", "release": "yarn validate && standard-version" }, "peerDependencies": { "preact": ">=10 || ^10.0.0-alpha.0 || ^10.0.0-beta.0" }, "dependencies": {}, "devDependencies": { "@babel/core": "^7.6.2", "@babel/plugin-transform-react-jsx": "^7.3.0", "@babel/preset-env": "^7.6.2", "@testing-library/preact": "^1.0.1", "@types/jest": "^24.0.18", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", "doctoc": "^1.4.0", "jest": "^24.9.0", "microbundle": "^0.12.0-next.6", "preact": "^10.0.0-rc.3", "rimraf": "^3.0.0", "standard": "^14.3.1", "standard-version": "^7.0.0" }, "publishConfig": { "access": "public" } }