4.0.2 • Published 1 year ago
cache-path v4.0.2
README
return a cache directory, like `find-cache-dir` do
install
npm install cache-path
desc
like find-cache-dir
what diff
- return path at any env
find-cache-dir
will fail return when not runing at a module/package folder - allow change to ur fav order for find cache path
demo
there also has async version for getCachePath
=> getCachePathAsync
import { normalizeName, getCachePath } from 'cache-path';
console.log(normalizeName('@node-novel/sort'));
// => _node_novel_sort
console.log(normalizeName('@node-novel/sort', true));
// => 7bc015f2
// when cwd in a module/package
console.log(getCachePath());
// => D:\Users\Documents\The Project\nodejs-yarn\ws-segment\packages\cache-path\node_modules\.cache
console.log(getCachePath('@node-novel/sort'));
// => D:\Users\Documents\The Project\nodejs-yarn\ws-segment\packages\cache-path\node_modules\.cache\_node_novel_sort
// when other
console.log(getCachePath());
// => T:\cache\npm-cache\.cache
console.log(getCachePath('@node-novel/sort'));
// => T:\cache\npm-cache\.cache\_node_novel_sort
4.0.2
1 year ago
4.0.1
1 year ago
4.0.0
2 years ago
3.0.14
3 years ago
3.0.12
3 years ago
3.0.13
3 years ago
3.0.10
3 years ago
3.0.11
3 years ago
3.0.8
3 years ago
3.0.7
3 years ago
3.0.6
3 years ago
3.0.9
3 years ago
3.0.4
3 years ago
3.0.3
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.5
3 years ago
3.0.0
3 years ago
2.0.39
3 years ago
2.0.35
3 years ago
2.0.33
3 years ago
2.0.34
3 years ago
2.0.32
3 years ago
2.0.28
3 years ago
2.0.29
3 years ago
2.0.30
3 years ago
2.0.26
3 years ago
2.0.27
3 years ago
2.0.24
4 years ago
2.0.25
4 years ago
2.0.23
4 years ago
2.0.22
4 years ago
2.0.21
4 years ago
2.0.20
4 years ago
2.0.19
4 years ago
2.0.17
4 years ago
2.0.18
4 years ago
2.0.16
4 years ago
2.0.13
4 years ago
2.0.14
4 years ago
2.0.11
4 years ago
2.0.10
4 years ago
2.0.9
4 years ago
2.0.8
4 years ago
2.0.7
4 years ago
2.0.6
5 years ago
2.0.5
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.4
5 years ago
2.0.1
5 years ago
1.0.4
6 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago