UNPKG

tiny-lru

Version:

A fast, lightweight LRU (Least Recently Used) cache for JavaScript with O(1) operations and optional TTL support.

76 lines (75 loc) 2.37 kB
{ "name": "tiny-lru", "version": "13.0.0", "description": "A fast, lightweight LRU (Least Recently Used) cache for JavaScript with O(1) operations and optional TTL support.", "keywords": [ "LRU", "cache", "caching", "TTL", "ttl-cache", "least-recently-used", "lightweight", "fast", "performance", "memoization", "expiration", "typescript", "nodejs", "browser", "esm", "zero-dependencies" ], "homepage": "https://github.com/avoidwork/tiny-lru", "bugs": { "url": "https://github.com/avoidwork/tiny-lru/issues" }, "license": "BSD-3-Clause", "author": "Jason Mulligan <jason.mulligan@avoidwork.com>", "repository": { "type": "git", "url": "git://github.com/avoidwork/tiny-lru.git" }, "source": "src/lru.js", "files": [ "dist/tiny-lru.cjs", "dist/tiny-lru.js", "types/lru.d.ts" ], "type": "module", "main": "dist/tiny-lru.cjs", "types": "types/lru.d.ts", "exports": { "types": "./types/lru.d.ts", "import": "./dist/tiny-lru.js", "require": "./dist/tiny-lru.cjs" }, "scripts": { "build": "npm run lint && npm run rollup", "benchmark:modern": "node benchmarks/modern-benchmark.js", "benchmark:perf": "node benchmarks/performance-observer-benchmark.js", "benchmark:comparison": "npm run benchmark:install-deps && node benchmarks/comparison-benchmark.js", "benchmark:install-deps": "npm install --no-save lru-cache quick-lru mnemonist", "benchmark:all": "npm run benchmark:modern && npm run benchmark:perf && npm run benchmark:comparison", "changelog": "auto-changelog -p", "fix": "oxlint --fix *.js benchmarks src tests/unit && oxfmt *.js benchmarks src tests/unit --write", "lint": "oxlint *.js benchmarks src tests/unit && oxfmt *.js benchmarks/*.js src/*.js tests/unit/*.js --check", "coverage": "node --test --experimental-test-coverage --test-coverage-exclude=dist/** --test-coverage-exclude=tests/** --test-reporter=spec tests/**/*.test.js 2>&1 | grep -A 1000 \"start of coverage report\" > coverage.txt", "rollup": "rollup --config", "test": "npm run lint && node --test tests/**/*.js", "prepare": "husky" }, "devDependencies": { "@rollup/plugin-terser": "^1.0.0", "auto-changelog": "^2.5.0", "husky": "^9.1.7", "oxfmt": "^0.41.0", "oxlint": "^1.56.0", "rollup": "^4.60.0", "tinybench": "^6.0.0" }, "engines": { "node": ">=14" }, "engineStrict": true }