UNPKG

memoize-one

Version:

A memoization library which only remembers the latest invocation

71 lines (70 loc) • 2.16 kB
{ "name": "memoize-one", "version": "7.0.0", "description": "A memoization library which only remembers the latest invocation", "author": "Alex Reardon <alexreardon@gmail.com>", "license": "MIT", "keywords": [ "memoize", "memoization", "cache", "performance" ], "repository": { "type": "git", "url": "git+https://github.com/alexreardon/memoize-one.git" }, "bugs": { "url": "https://github.com/alexreardon/memoize-one/issues" }, "type": "module", "exports": "./dist/memoize-one.js", "main": "./dist/memoize-one.js", "types": "./dist/memoize-one.d.ts", "sideEffects": false, "files": [ "dist", "src" ], "size-limit": [ { "name": "import { memoizeOne }", "path": "dist/memoize-one.js", "import": "{ memoizeOne }", "limit": "185 B" }, { "name": "whole module", "path": "dist/memoize-one.js", "limit": "230 B" } ], "devDependencies": { "@arethetypeswrong/cli": "^0.18.5", "@size-limit/preset-small-lib": "^14.3.0", "@types/node": "^22.20.5", "es-toolkit": "^1.53.2", "oxlint": "^1.93.0", "prettier": "^3.10.0", "publint": "^0.3.25", "size-limit": "^14.3.0", "typescript": "^7.0.2", "vitest": "^5.1.0" }, "scripts": { "validate": "npm run format:check && npm run lint && npm run typecheck", "test": "vitest run", "typecheck": "tsc --noEmit", "lint": "oxlint", "format": "prettier --write .", "format:check": "prettier --check .", "test:size": "npm run build && size-limit", "build": "npm run build:clean && tsc -p tsconfig.build.json", "build:clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"", "bench": "node benchmarks/comparison/run.ts", "bench:library-comparison": "npm run build && cd benchmarks/library-comparison && npm ci && npm start", "check:package": "npm run build && publint --strict && attw --pack . --profile esm-only", "test:smoke": "npm run build && node scripts/smoke-test.js", "release": "npm run validate && npm test && npm run check:package && npm run test:smoke && npm publish" } }