RedEnvelope/node_modules/cachedir
2026-03-01 23:22:26 +08:00
..
.travis.yml build: 构建脚本更新 2026-03-01 23:22:26 +08:00
index.js build: 构建脚本更新 2026-03-01 23:22:26 +08:00
license build: 构建脚本更新 2026-03-01 23:22:26 +08:00
package.json build: 构建脚本更新 2026-03-01 23:22:26 +08:00
readme.md build: 构建脚本更新 2026-03-01 23:22:26 +08:00
test.js build: 构建脚本更新 2026-03-01 23:22:26 +08:00

node-cachedir

Provides a directory where the OS wants you to store cached files.

Installation

npm install --save cachedir

Usage

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.