Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Extra small nodejs module for chdir in chainer fashion + read file.
Install:
npm install cd
Rules:
1. Reading .json will strip comments and convert to JSON.
2. Reading .js is equivalent of require() that file.
3. Other files are just read.
4. Supply file as argument on last call. No chaning afterwards.
5. Module is synchro. Hmmm, do we really need async version?
Usage:
var Cd = require('cd');
var cd = new Cd('.');
// Read lol.json from current directory
var lol = cd('lol.json');
// Read wtf.js from test directory.
var wtf = cd().test('wtf.js');
// Chain as you like
var file = cd().dir1().dir2(file_in_dir2);
/*
* Use try/catch for safety (non-existent dirs)
*/
try {
content = cd().existDir1().nonexistDir().existDir2(file2);
} catch(e) {
// ...
}
If you have cool and pragmatic idea let me know. This module is not going to grow much, there is no need for yet another bloated module.
FAQs
chdir in chainer fashion + read file
The npm package cd receives a total of 11,310 weekly downloads. As such, cd popularity was classified as popular.
We found that cd 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.