File size: 502 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# node-cachedir
Provides a directory where the OS wants you to store cached files.
## Installation
```sh
npm install --save cachedir
```
## Usage
```javascript
const cachedir = require('cachedir')
console.log(cachedir('myapp'))
// e.g.
//=> '/Users/linus/Library/Caches/myapp'
//=> '/home/linus/.cache/myapp'
//=> 'C:\Users\linus\AppData\Local\myapp\Cache'
```
## API
### `cachedir(id)`
- `id` (`string`, required)
- returns `string`
Return path to an appropriate place to store cache files.
|