Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Cross-platform command-line app to move files and directories to the trash - A safer alternative to `rm`
Cross-platform command-line app to move files and directories to the trash - A safer alternative to
rm
Works on OS X, Linux and Windows.
$ npm install --global trash
$ trash --help
Usage
$ trash <path> [<path> ...]
Example
$ trash unicorn.png rainbow.png
Globbing support is left up to your shell, but $ trash *.png
should expand to the above in most shells.
$ npm install --save trash
var trash = require('trash');
trash(['unicorn.png', 'rainbow.png'], function (err) {
if (err) {
throw err;
}
console.log('done');
});
On OS X AppleScript is used as it's the only way to support built-in features such as Put back.
On Linux trash-cli is used. Requires Python. Help wanted on a Node version.
On Windows cmdutils is used.
MIT © Sindre Sorhus
FAQs
Move files and folders to the trash
The npm package trash receives a total of 96,140 weekly downloads. As such, trash popularity was classified as popular.
We found that trash demonstrated a healthy version release cadence and project activity because the last version was released less than 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.