UNPKG

pnpm

Version:

Fast, disk space efficient package manager

132 lines (131 loc) 5.9 kB
{ "_args": [ [ { "raw": "map-age-cleaner@^0.1.1", "scope": null, "escapedName": "map-age-cleaner", "name": "map-age-cleaner", "rawSpec": "^0.1.1", "spec": ">=0.1.1 <0.2.0", "type": "range" }, "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/mem" ] ], "_from": "map-age-cleaner@^0.1.1", "_hasShrinkwrap": false, "_id": "map-age-cleaner@0.1.3", "_location": "/map-age-cleaner", "_nodeVersion": "8.9.4", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/map-age-cleaner_0.1.3_1542128600104_0.44162900083517775" }, "_npmUser": { "name": "samverschueren", "email": "sam.verschueren@gmail.com" }, "_npmVersion": "5.6.0", "_phantomChildren": {}, "_requested": { "raw": "map-age-cleaner@^0.1.1", "scope": null, "escapedName": "map-age-cleaner", "name": "map-age-cleaner", "rawSpec": "^0.1.1", "spec": ">=0.1.1 <0.2.0", "type": "range" }, "_requiredBy": [ "/mem" ], "_resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "_shasum": "7d583a7306434c055fe474b0f45078e6e1b4b92a", "_shrinkwrap": null, "_spec": "map-age-cleaner@^0.1.1", "_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/mem", "author": { "name": "Sam Verschueren", "email": "sam.verschueren@gmail.com", "url": "github.com/SamVerschueren" }, "bugs": { "url": "https://github.com/SamVerschueren/map-age-cleaner/issues" }, "dependencies": { "p-defer": "^1.0.0" }, "description": "Automatically cleanup expired items in a Map", "devDependencies": { "@types/delay": "^2.0.1", "@types/node": "^10.7.1", "ava": "^0.25.0", "codecov": "^3.0.0", "del-cli": "^1.1.0", "delay": "^3.0.0", "nyc": "^12.0.0", "tslint": "^5.11.0", "tslint-xo": "^0.9.0", "typescript": "^3.0.1" }, "directories": {}, "dist": { "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "shasum": "7d583a7306434c055fe474b0f45078e6e1b4b92a", "tarball": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "fileCount": 5, "unpackedSize": 8408, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6wPYCRA9TVsSAnZWagAAUMIP/RnSU7mnn0v2lXO72iJ+\necS3ntUy+fE2Ad04TrcCjYiaBpy5Lj2r2eGcda+qjM6agr3PMgA2lYuVVCT5\noB7S18wFnbWjqT9jloUFoxfl7d4yWVlmhuCEvfN7d3nEJMueWDwtoePeoejH\n7Ll27A/nBaja0FSsBIUChf4gzGKZAl1S9Uuz+pZLsOTmCk4ToPVWvmTcmSEW\n+8CiScr7JP810oq3eqYqhLeH46o4FhTd2fkChRKsvogzZmV4lCCiq4DAAggV\nU8Q+ojzadDeEIWuvBkIyoszO9Nlt5da1jncX8YIeJc/+IqZmLhREgMqRzNlK\n0QxqgmzqFHg6cJAqBJvUWT/i+n5A2GmqVVUcRW+uB6jjvbAGOJ3SOYldQEZ8\nStEgyERsmSdL0cRI9rdKOycGRHfVYn5te4TL8mnWQG4iCFk7EmJmf3b4cGEp\nnK5HJ/W5hFenMsLs39NPHwK4LY3JBhi0Vix/xdq+SbpzDNIG92xDWC3l7khz\nq1dC3EwSTzXEMK9PwHjjcSHHdM9KIgl+D1Q3KjRrEXMWBN5hZQZwvH8k63cM\ntlMWf0sb+mIE6gWGDhNAMkOv2uhkojB+pnBPIVvAmDNV0Ft3vQSkdmcLL+ij\nIkUxNzOk6jWxoMcUttB9pAszO/QyNVYGWOc+Rt+KHvnH27oRoFSnVS51/xG4\nPCHf\r\n=lXzg\r\n-----END PGP SIGNATURE-----\r\n" }, "engines": { "node": ">=6" }, "files": [ "dist/index.js", "dist/index.d.ts" ], "gitHead": "4583ef67c78be004e80ad9b67bf43c770ff810b2", "homepage": "https://github.com/SamVerschueren/map-age-cleaner#readme", "keywords": [ "map", "age", "cleaner", "maxage", "expire", "expiration", "expiring" ], "license": "MIT", "main": "dist/index.js", "maintainers": [ { "name": "samverschueren", "email": "sam.verschueren@gmail.com" } ], "name": "map-age-cleaner", "nyc": { "exclude": [ "dist/test.js" ] }, "optionalDependencies": {}, "readme": "# map-age-cleaner\n\n[![Build Status](https://travis-ci.org/SamVerschueren/map-age-cleaner.svg?branch=master)](https://travis-ci.org/SamVerschueren/map-age-cleaner) [![codecov](https://codecov.io/gh/SamVerschueren/map-age-cleaner/badge.svg?branch=master)](https://codecov.io/gh/SamVerschueren/map-age-cleaner?branch=master)\n\n> Automatically cleanup expired items in a Map\n\n\n## Install\n\n```\n$ npm install map-age-cleaner\n```\n\n\n## Usage\n\n```js\nimport mapAgeCleaner from 'map-age-cleaner';\n\nconst map = new Map([\n\t['unicorn', {data: '🦄', maxAge: Date.now() + 1000}]\n]);\n\nmapAgeCleaner(map);\n\nmap.has('unicorn');\n//=> true\n\n// Wait for 1 second...\n\nmap.has('unicorn');\n//=> false\n```\n\n> **Note**: Items have to be ordered ascending based on the expiry property. This means that the item which will be expired first, should be in the first position of the `Map`.\n\n\n## API\n\n### mapAgeCleaner(map, [property])\n\nReturns the `Map` instance.\n\n#### map\n\nType: `Map`\n\nMap instance which should be cleaned up.\n\n#### property\n\nType: `string`<br>\nDefault: `maxAge`\n\nName of the property which olds the expiry timestamp.\n\n\n## Related\n\n- [expiry-map](https://github.com/SamVerschueren/expiry-map) - A `Map` implementation with expirable items\n- [expiry-set](https://github.com/SamVerschueren/expiry-set) - A `Set` implementation with expirable keys\n- [mem](https://github.com/sindresorhus/mem) - Memoize functions\n\n\n## License\n\nMIT © [Sam Verschueren](https://github.com/SamVerschueren)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/SamVerschueren/map-age-cleaner.git" }, "scripts": { "build": "npm run clean && tsc", "clean": "del-cli dist", "lint": "tslint --format stylish --project .", "prepublishOnly": "npm run build", "pretest": "npm run build -- --sourceMap", "test": "npm run lint && nyc ava dist/test.js" }, "sideEffects": false, "typings": "dist/index.d.ts", "version": "0.1.3" }