
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
cache-directory
Advanced tools
cache-directory
Find the proper cache directory based on operating system
npm install cache-directory
cache-directory
takes one argument, the app name.
var cacheDir = require('cache-directory');
console.log(cacheDir('myApp'));
When run on OS X, cache-directory
assumes it isn't run in a sandboxed process environment. If it is, it will probably break. Additionally, the app name is used instead of the conventional bundle identifier (for simplicity and because many cache-directory
consumers won't necessarily have a bundle identifier).
If a suitable cache directory can't be found, cache-directory
will return null
. You need to handle this case. A reasonable course of action would be to use a temp directory, for which you can use the cache-or-tmp-directory
module.
LGPL 3.0+
Alex Jordan alex@strugee.net
2.0.0 - 2018-03-01
os.homedir()
is used directly instead of a ponyfillFAQs
Find the proper cache directory based on operating system
The npm package cache-directory receives a total of 0 weekly downloads. As such, cache-directory popularity was classified as not popular.
We found that cache-directory demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.