Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Generate portable (and XDG-compatible) paths for storing cache, config, data, etc
Get paths for storing things like data, config, cache, etc
Uses the correct OS-specific paths. Most developers get this wrong.
npm install os-paths
const osPaths = require('os-paths');
const paths = osPaths('MyApp');
paths.data;
//=> '/home/rivy/.local/share/MyApp-nodejs'
paths.config
//=> '/home/rivy/.config/MyApp-nodejs'
Note: It only generates the path strings. It doesn't create the directories for you. You could use make-dir
to create the directories.
Type: string
Name of your project. Used to generate the paths.
Type: Object
Type: string
Default: 'nodejs'
Don't use this option unless you really have to!
Suffix appended to the project name to avoid name conflicts with native
apps. Pass an empty string to disable it.
Directory for data files.
Directory for config files.
Directory for non-essential data files.
Directory for log files.
Directory for temporary files.
MIT © Roy Ivy III, Sindre Sorhus
FAQs
Determine common OS/platform paths (home, temp, ...)
The npm package os-paths receives a total of 606,087 weekly downloads. As such, os-paths popularity was classified as popular.
We found that os-paths 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.