cachedir
TypeScript icon, indicating that this package has built-in type declarations

2.4.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i cachedir

Weekly Downloads

7,247,448

Version

2.4.0

License

MIT

Unpacked Size

6.17 kB

Total Files

7

Last publish

Collaborators

  • linusu