Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trash

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trash - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

14

cli.js

@@ -6,10 +6,5 @@ #!/usr/bin/env node

var pkg = require('./package.json');
var trash = require('./index');
var trash = require('./');
var input = argv._;
var notifier = updateNotifier({
packageName: pkg.name,
packageVersion: pkg.version
});
function help() {

@@ -27,5 +22,6 @@ console.log([

if (notifier.update) {
notifier.notify(true);
}
updateNotifier({
packageName: pkg.name,
packageVersion: pkg.version
}).notify();

@@ -32,0 +28,0 @@ if (argv.version) {

@@ -23,3 +23,3 @@ 'use strict';

});
};
}

@@ -36,3 +36,3 @@ function linux(paths, cb) {

});
};
}

@@ -45,3 +45,3 @@ function win(paths, cb) {

});
};
}

@@ -54,4 +54,7 @@ module.exports = function (paths, cb) {

cb = cb || function () {};
paths = paths.map(function (el) { return path.resolve(el) });
paths = paths.map(function (el) {
return path.resolve(el);
});
if (process.platform === 'darwin') {

@@ -58,0 +61,0 @@ osx(paths, cb);

{
"name": "trash",
"version": "0.1.2",
"version": "1.0.0",
"description": "Cross-platform command-line app for moving files and directories to the trash - A safer alternative to `rm`",

@@ -45,5 +45,5 @@ "license": "MIT",

"dependencies": {
"escape-string-applescript": "^0.1.0",
"minimist": "^0.1.0",
"update-notifier": "^0.1.8"
"escape-string-applescript": "^0.1.1",
"minimist": "^0.2.0",
"update-notifier": "^0.2.0"
},

@@ -50,0 +50,0 @@ "devDependencies": {

@@ -9,3 +9,3 @@ # ![trash](https://cdn.rawgit.com/sindresorhus/trash/3aa70853f1efb58d0d2512e32d617d246c88953c/media/logo.svg)

In contrast to `rm` which is [dangerous](http://docstore.mik.ua/orelly/unix3/upt/ch14_03.htm) and permanently delete files, this only moves them to the trash, which is much safer.
In contrast to `rm` which is [dangerous](http://docstore.mik.ua/orelly/unix3/upt/ch14_03.htm) and permanently delete files, this only moves them to the trash, which is much safer and reversible. You should not alias `rm` to `trash` however as that would break most scripts relying on `rm` behaviour. Rather use `trash` from the CLI and in your own scripts. I would also recommend reading my guide on [safeguarding `rm`](https://github.com/sindresorhus/guides/blob/master/how-not-to-rm-yourself.md#safeguard-rm).

@@ -12,0 +12,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc