DGLabGame/node_modules/cachedir
3944Realms 41203ae1c6 feat: 初始化
添加用户准则界面
2026-03-09 01:20:32 +08:00
..
.travis.yml feat: 初始化 2026-03-09 01:20:32 +08:00
index.js feat: 初始化 2026-03-09 01:20:32 +08:00
license feat: 初始化 2026-03-09 01:20:32 +08:00
package.json feat: 初始化 2026-03-09 01:20:32 +08:00
readme.md feat: 初始化 2026-03-09 01:20:32 +08:00
test.js feat: 初始化 2026-03-09 01:20:32 +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.