hrms-manual/node_modules/cachedir
2023-09-06 14:51:44 +07:00
..
.travis.yml first commit 2023-09-06 14:51:44 +07:00
index.d.ts first commit 2023-09-06 14:51:44 +07:00
index.js first commit 2023-09-06 14:51:44 +07:00
license first commit 2023-09-06 14:51:44 +07:00
package.json first commit 2023-09-06 14:51:44 +07:00
readme.md first commit 2023-09-06 14:51:44 +07:00
test.js first commit 2023-09-06 14:51:44 +07: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(id)

  • id (string, required)
  • returns string

Return path to an appropriate place to store cache files.