数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
474 B

2 years ago
# 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(name: string) => string`
Return path to an appropriate place to store cache files.