{"_id":"@anyplot/lru","_rev":"1-3932b13bf8e5ed7aff71ed55b32ea03c","name":"@anyplot/lru","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@anyplot/lru","version":"1.0.0","description":"Nano (~400 bytes) & O(1) performance LRU library.","license":"MIT","main":"lib/index.js","module":"esm/index.js","browser":"dist/template.min.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf -rf lib esm dist","lint-staged":"lint-staged","size":"limit-size","test":"jest","build:umd":"rimraf ./dist && rollup -c && npm run size","build:cjs":"rimraf ./lib && tsc --module commonjs --outDir lib","build:esm":"rimraf ./esm && tsc --module ESNext --outDir esm","build":"npm run build:cjs && npm run build:esm && npm run build:umd","prepublishOnly":"npm run build"},"keywords":["lru","anyplot"],"devDependencies":{"@commitlint/cli":"^11.0.0","@types/jest":"^26.0.20","husky":"^5.0.9","jest":"^26.6.3","limit-size":"^0.1.4","lint-staged":"^10.5.4","prettier":"^2.2.1","rimraf":"^3.0.2","rollup":"^2.39.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-typescript":"^1.0.1","rollup-plugin-uglify":"^6.0.4","ts-jest":"^26.5.1","ts-node":"^9.1.1","typescript":"^4.1.5"},"jest":{"preset":"ts-jest","collectCoverage":true,"testRegex":"(/__tests__/.*\\.(test|spec))\\.ts$","collectCoverageFrom":["src/**/*.ts"]},"lint-staged":{"*.{ts,tsx}":["prettier --write","git add"]},"limit-size":[{"path":"dist/lru.min.js","limit":"500b","gzip":true},{"path":"dist/lru.min.js","limit":"1 Kb"}],"husky":{"hooks":{"pre-commit":"npm run lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"author":{"name":"hustcc","url":"https://atool.vip/"},"repository":{"type":"git","url":"git+https://github.com/anyplot/lru.git"},"bugs":{"url":"https://github.com/anyplot/lru/issues"},"gitHead":"cb0c3a876a1960784b3a5e27f4d9c5641bbd8910","homepage":"https://github.com/anyplot/lru#readme","_id":"@anyplot/lru@1.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-/ZKcbyw9Y8KMj+Gfx46LhikfzkHU6ynW105kqlj0v2YKBTCa9qSlvwi0FFtJ9gm87JBc9aEJ86EP+s98eSfRsQ==","shasum":"df09318e5acbfe282c17d0f3708ee9cdc14f86fe","tarball":"https://registry.npmjs.org/@anyplot/lru/-/lru-1.0.0.tgz","fileCount":11,"unpackedSize":20636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLIkLCRA9TVsSAnZWagAAKgsP/3z59h9Wjjl6IArf3FFk\nbl4g1MDwkbi+06zIVIobJJRnCUVP9H4SEyP6PCAohb1MHT+czomakaJxHD5f\n/JBgfod7vajI0/nvKUC5na4FtG5wTdthokxIFPySbgaiuKf6y+AWu+2n0mJK\nX8phCguNVkLZnVKS9aAbj4+ykrfqTpl2tag83U+sARAZ8FwVyRwn0P5DBOxD\neUz6pBw0ESLDCao6LvdGXM5CMFGdSR8cUUE9Tf9P90rdl9YFOOxEFmI2qgH/\nNw9tGddZHy03XKuSAZEMWME8oyDJPgpYyY+PdQ3GLVZthERaKcqMo6+UfEld\n58DBfcQYbLLp5dtspkInFKkd6iXBQmFbA0rGeELpwvuL+PgE+coWNKbnICQT\nem9oM3EdwuWwgjcC3Jv7OMtaPovUm5TxIrRGSJdHOoawmLhJ5GSABHopuxn9\nl+XWn0IHgXc8xKbmTIDXL09Tsjd/B0eWtLlwLwt3ppBqv/ZFYSFpMNrGa/D7\n/lbNzX3EnLkmokjnNdoSPhfdoiO/z8OdnjGiLe3q5rOW8WsWJZWj9kAglWU1\nO6e2uaAXLQ+OYg/aY3J0S+OD9rJoJJ7Xo+UB6HpjxVuvZXIKiNuPA6UW9V3G\nepSEfUKqNZ2YQsCO6CiX5SZQLY0x0X7LuJmbp5VPYscMRc7j29YPjL6PfR8Z\nDssH\r\n=xweZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1JVhEsf/3TDxRjRAAYSZJLLLQ5sx9gxK4OvZYUJNMmAIhAK3WJIAPuOomlBMDJnEVRMvfdx8QkY7RWzt4R6+jGSmi"}]},"_npmUser":{"name":"atool","email":"i@hust.cc"},"directories":{},"maintainers":[{"name":"atool","email":"i@hust.cc"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lru_1.0.0_1613531402522_0.6602956867994147"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-17T03:10:02.276Z","1.0.0":"2021-02-17T03:10:02.778Z","modified":"2022-04-04T14:27:13.059Z"},"maintainers":[{"name":"atool","email":"i@hust.cc"}],"description":"Nano (~400 bytes) & O(1) performance LRU library.","homepage":"https://github.com/anyplot/lru#readme","keywords":["lru","anyplot"],"repository":{"type":"git","url":"git+https://github.com/anyplot/lru.git"},"author":{"name":"hustcc","url":"https://atool.vip/"},"bugs":{"url":"https://github.com/anyplot/lru/issues"},"license":"MIT","readme":"# @AnyPlot/lru\n\n> 🧩 Nano (~400 bytes) & O(1) performance LRU library.\n\n\n[![Build Status](https://github.com/anyplot/lru/workflows/build/badge.svg)](https://github.com/anyplot/lru/actions)\n[![Coverage Status](https://coveralls.io/repos/github/anyplot/lru/badge.svg?branch=main)](https://coveralls.io/github/anyplot/lru?branch=main)\n[![npm Version](https://img.shields.io/npm/v/@anyplot/lru.svg)](https://www.npmjs.com/package/@anyplot/lru)\n[![npm Download](https://img.shields.io/npm/dm/@anyplot/lru.svg)](https://www.npmjs.com/package/@anyplot/lru)\n[![npm License](https://img.shields.io/npm/l/@anyplot/lru.svg)](https://www.npmjs.com/package/@anyplot/lru)\n\n\n## Usage\n\n```ts\nimport LRU from '@anyplot/lru';\n\nconst lru = new LRU(3);\nlru.set('a', 1);\nlru.set('b', 2);\nlru.set('c', 3);\n\nlru.size();                 // 3\nlru.get('a');               // 1\nlru.get('b');               // 2\n\nlru.set('d', 4);\n\nlru.peer('a');              // 1\nlru.peer('b');              // 2\nlru.peer('c');              // undefined\nlru.peer('d');              // 4\n```\n\n\n## License\n\nMIT@[hustcc](https://github.com/hustcc).\n","readmeFilename":"README.md"}