cachedir
Provides a directory where the OS wants you to store cached files.
Last updated 3 years ago by linusu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cachedir 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 2.4.0                                ...           latest (3 years ago)

15 Versions

  • 2.4.0                                ...           3 years ago
  • 2.3.0                                ...           6 years ago
  • 2.2.0                                ...           7 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           10 years ago
  • 0.1.4                                ...           10 years ago
  • 0.1.3                                ...           10 years ago
  • 0.1.2 [deprecated]           ...           10 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |