UNPKG

react-use-anywhere

Version:

Use React hooks anywhere in your codebase - in services, utilities, and business logic. Router-agnostic, hook-agnostic, and works with any React hooks (auth, navigation, state, custom hooks, etc.).

126 lines (125 loc) 3.5 kB
{ "name": "react-use-anywhere", "version": "1.1.2", "description": "Use React hooks anywhere in your codebase - in services, utilities, and business logic. Router-agnostic, hook-agnostic, and works with any React hooks (auth, navigation, state, custom hooks, etc.).", "author": "akhshyganesh <akhshy.balakannan@gmail.com>", "license": "MIT", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { "import": "./dist/index.js", "require": "./dist/index.cjs", "types": "./dist/index.d.ts" } }, "files": [ "dist", "README.md", "LICENSE", "CHANGELOG.md" ], "keywords": [ "react", "hooks", "use-anywhere", "dependency-injection", "service-layer", "business-logic", "typescript", "hook-injection", "modular", "router-agnostic", "hook-agnostic", "react-router", "tanstack-router", "nextjs", "navigation", "authentication", "state-management", "utility", "production-ready" ], "repository": { "type": "git", "url": "https://github.com/akhshyganesh/react-use-anywhere.git" }, "bugs": { "url": "https://github.com/akhshyganesh/react-use-anywhere/issues" }, "homepage": "https://github.com/akhshyganesh/react-use-anywhere#readme", "scripts": { "dev": "vite --config vite.demo.config.ts", "build": "npm run build:lib && npm run build:demo", "build:lib": "vite build --config vite.lib.config.ts", "build:demo": "vite build --config vite.demo.config.ts", "preview": "vite preview --config vite.demo.config.ts", "docs:dev": "cd docs && npm run dev", "docs:build": "cd docs && npm run build", "docs:preview": "cd docs && npm run preview", "docs:deploy": "cd docs && npm run deploy", "lint": "eslint . --ext .ts,.tsx", "lint:fix": "eslint . --ext .ts,.tsx --fix", "format": "prettier --write .", "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage", "type-check": "tsc --noEmit", "prepare": "husky install", "prepublishOnly": "npm run test && npm run build:lib" }, "peerDependencies": { "react": ">=16.8.0 <19.1.0", "react-dom": ">=16.8.0 <19.1.0" }, "devDependencies": { "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@types/jest": "^29.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.55.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "husky": "^8.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "lint-staged": "^15.0.0", "prettier": "^3.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "ts-jest": "^29.4.0", "typescript": "^5.2.2", "vite": "^5.0.8", "vite-plugin-dts": "^3.7.2" }, "jest": { "preset": "ts-jest", "testEnvironment": "jsdom", "setupFilesAfterEnv": [ "<rootDir>/test/setup.ts" ], "testMatch": [ "<rootDir>/test/**/*.{test,spec}.{ts,tsx}" ], "moduleNameMapping": { "^@/(.*)$": "<rootDir>/lib/$1" } }, "engines": { "node": ">=16.0.0", "npm": ">=8.0.0" }, "lint-staged": { "*.{ts,tsx}": [ "eslint --fix --max-warnings=0", "prettier --write" ], "*.{json,md}": [ "prettier --write" ] } }