{"id":17472610,"url":"https://github.com/shinnn/npcache","last_synced_at":"2026-04-27T12:03:50.606Z","repository":{"id":57272994,"uuid":"145068895","full_name":"shinnn/npcache","owner":"shinnn","description":"Manipulate cache of npm packages","archived":false,"fork":false,"pushed_at":"2019-07-11T15:15:13.000Z","size":162,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T08:49:49.874Z","etag":null,"topics":["cache","javascript","nodejs","npm","promise","stream"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-17T03:47:57.000Z","updated_at":"2024-07-01T19:25:20.000Z","dependencies_parsed_at":"2022-09-08T23:20:21.559Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/npcache","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fnpcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fnpcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fnpcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fnpcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/npcache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991554,"owners_count":20706126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","javascript","nodejs","npm","promise","stream"],"created_at":"2024-10-18T17:28:54.050Z","updated_at":"2026-04-27T12:03:50.550Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npcache\n\n[![npm version](https://img.shields.io/npm/v/npcache.svg)](https://www.npmjs.com/package/npcache)\n[![Build Status](https://travis-ci.com/shinnn/npcache.svg?branch=master)](https://travis-ci.com/shinnn/npcache)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/npcache.svg)](https://coveralls.io/github/shinnn/npcache?branch=master)\n\nManipulate cache of npm packages\n\n```javascript\nconst npcache = require('npcache');\n\n(async () =\u003e {\n  const cache = await npcache.get('make-fetch-happen:request-cache:https://registry.npmjs.org/glob');\n\n  cache.metadata; //=\u003e {url: 'https://registry.npmjs.org/glob', ...}\n  cache.data; //=\u003e \u003cBuffer 7b 22 76 65 72 73 69 6f 6e 73 22 3a 7b 22 ...\u003e\n  cache.size; //=\u003e 37086  \n  cache.integrity; //=\u003e 'sha512-Non1RHdlmK+8lJaN1a88N ...'\n})();\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install npcache\n```\n\n## API\n\n```javascript\nconst npcache = require('npcache');\n```\n\n### npcache\n\nThe API is based on [cacache](https://github.com/npm/cacache), a cache manipulation library used inside [npm CLI](https://github.com/npm/cli).\n\nNote the following differences:\n\n* Original `cache` parameters are omitted, and it defaults to [`_cacache` in the npm cache directory](https://docs.npmjs.com/cli/cache#details).\n* Method aliases, for example `cacache.rm.entry` → `cacache.rm`, are removed.\n* [`clearMemoized()`](https://github.com/npm/cacache#clear-memoized) returns a `Promise` instead of `undefined`.\n* [`setLocale()`](https://github.com/npm/cacache#set-locale) method is not supported.\n\n```javascript\n(async () =\u003e {\n  for await (const {path} of npcache.ls.stream()) {\n    console.log(path);\n  }\n})();\n```\n\n```\n/Users/shinnn/.npm/_cacache/content-v2/sha512/a6/12/5f41506e689339ada ...\n/Users/shinnn/.npm/_cacache/content-v2/sha512/ff/1a/f50039b96e74e38cd ...\n/Users/shinnn/.npm/_cacache/content-v2/sha512/0b/61/241d7c17bcbb1baee ...\n/Users/shinnn/.npm/_cacache/content-v2/sha512/39/a5/358478e025ff9bd0d ...\n...\n```\n\n## License\n\n[ISC License](./LICENSE) © 2018 - 2019 Watanabe Shinnosuke\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fnpcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fnpcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fnpcache/lists"}