Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Quickly get directory structure and files from a specified path in node, with support for recursive operations.
$ npm install dstruc --save
var dstruc = require('dstruc');
var structure = dstruc.sync('/path/to/dir');
console.log(structure);
/*
{ files: [ 'level.one.file.txt' ],
dirs:
{ another_level_two: { files: [Object], dirs: {} },
level_two: { files: [Object], dirs: {} } } }
*/
var structureWithExtensions = dstruc.sync('/another/path/to/dir', { extensionAsKey: true });
console.log(structureWithExtensions);
/*{ files: { txt: [ 'one.file.txt', 'two.file.txt' ] }, dirs: {} }*/
recursive: Will traverse directories until it reaches the bottom. If set to false, directories of the top level will instead be put in an array.
extensionAsKey: Will put the files in an object with their extension as the key instead of an array.
$ npm test
BSD
FAQs
Get directories and files recursively.
The npm package dstruc receives a total of 3 weekly downloads. As such, dstruc popularity was classified as not popular.
We found that dstruc 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.