# npm-cache-filename

> Given a cache folder and url, return the appropriate cache folder.

Latest version **1.0.2** (published 2015-06-29) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install npm-cache-filename
pnpm add npm-cache-filename
yarn add npm-cache-filename
bun add npm-cache-filename
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-06-29 |
| First published | 2014-05-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/npm-cache-filename) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Isaac Z. Schlueter |
| Maintainers | isaacs, kat, zkat |

## Links

- npm: https://www.npmjs.com/package/npm-cache-filename
- Repository: https://github.com/npm/npm-cache-filename
- Issues: https://github.com/npm/npm-cache-filename/issues
- npm.io page: https://npm.io/package/npm-cache-filename

## Recent versions

- 1.0.2 (latest) — 2015-06-29
- 1.0.1 — 2014-05-14
- 1.0.0 — 2014-05-14

## README

# npm-cache-filename

Given a cache folder and url, return the appropriate cache folder.

## USAGE

```javascript
var cf = require('npm-cache-filename');
console.log(cf('/tmp/cache', 'https://registry.npmjs.org:1234/foo/bar'));
// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar
```

As a bonus, you can also bind it to a specific root path:

```javascript
var cf = require('npm-cache-filename');
var getFile = cf('/tmp/cache');

console.log(getFile('https://registry.npmjs.org:1234/foo/bar'));
// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar
```

---
_Source: https://npm.io/package/npm-cache-filename · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
