UNPKG

smart-cache-gc

Version:

A GC-aware cache using WeakRef and FinalizationRegistry

80 lines (79 loc) • 2.3 kB
{ "name": "smart-cache-gc", "version": "1.2.0", "main": "dist/index.cjs", "module": "dist/index.js", "types": "dist/index.d.ts", "type": "module", "description": "A GC-aware cache using WeakRef and FinalizationRegistry", "engines": { "node": ">=14.6" }, "scripts": { "test": "vitest", "test:ci": "vitest run", "test:coverage": "vitest --coverage", "test:gc": "node --expose-gc node_modules/vitest/vitest.mjs", "build": "tsup src/index.ts --format cjs,esm --dts --minify --dts-resolve", "clean": "rm -rf dist", "prepare": "husky", "lint": "eslint . --ext .ts", "demo:node": "npm run build && node --expose-gc dist/examples/node/index.js", "demo:browser": "npm run build && npx serve dist/examples/browser", "demo:all": "npm run demo:node && echo '\\n🌐 Now run: npm run demo:browser'", "build:bench": "tsup bench/index.ts --format cjs --minify --no-dts --out-dir dist/bench", "benchmark": "npm run build:bench && node --expose-gc dist/bench/index.cjs" }, "lint-staged": { "**/*.ts": "eslint --fix" }, "repository": { "type": "git", "url": "git+https://github.com/kingmaker9841/smart-resource-cache.git" }, "files": [ "dist", "!dist/examples", "README.md", "LICENSE", "!dist/bench" ], "keywords": [ "cache", "smart-cache", "low-level-cache", "smart-resource-cache", "finalizationRegistry", "WeakRef", "WeakMap", "weakRef with finalization registry" ], "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs" } }, "author": "Milan Panta", "license": "MIT", "bugs": { "url": "https://github.com/kingmaker9841/smart-resource-cache/issues" }, "homepage": "https://github.com/kingmaker9841/smart-resource-cache#readme", "devDependencies": { "@eslint/js": "^9.30.1", "@types/node": "^24.0.10", "@typescript-eslint/eslint-plugin": "^8.35.1", "@typescript-eslint/parser": "^8.35.1", "@vitest/coverage-v8": "^3.2.4", "eslint": "^9.30.1", "globals": "^16.3.0", "husky": "^9.1.7", "lint-staged": "^16.1.2", "tsup": "^8.5.0", "typescript": "^5.8.3", "typescript-eslint": "^8.35.1", "vitest": "^3.2.4" } }