
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
rmrf-promise
Advanced tools
The awesome rimraf package wrapped in Promises for removing files and folders recursively using Node.
While Node's built-in fs
package works well for many file system operations, recursive folder deletion is somewhat inconsistent, especially in Windows. rimraf
solved that problem by creating a library which can consistently remove folders. rmrf-promise
does not add or take away anything from rimraf
itself. All that rmrf-promise
does is return Promises instead of taking callbacks when calling rimraf
.
$ npm install rmrf-promise
rimraf(filePath, [options])
filePath
is the path to the file or folder to be removed.
options
is an optional object of rimraf
options. To see all available options, click here.
Examples:
const rmrf = require('rmrf-promise');
// Usage with manual Promise handling
rmrf('some-file-path')
.then(() => {
// success!
})
.catch(err => {
// handle error
});
// Usage within an sync function
async function() {
try {
await rmrf('some-file-path');
// success!
} catch(err) {
// handle error
}
};
// Usage within a generator function
co(function*() {
try {
yield rmrf('some-file-path');
// success!
} catch(err) {
// handle error
}
});
$ npm install
$ npm test
Apache License Version 2.0
FAQs
rifraf wrapped in Promises
The npm package rmrf-promise receives a total of 178 weekly downloads. As such, rmrf-promise popularity was classified as not popular.
We found that rmrf-promise 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.