Socket
Socket
Sign inDemoInstall

trash

Package Overview
Dependencies
Maintainers
2
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 3.1.2 to 3.2.0

9

index.js
'use strict';
var path = require('path');
var pathExists = require('path-exists');
var globby = require('globby');

@@ -15,3 +16,9 @@ module.exports = function (paths) {

paths = paths.map(function (x) {
return path.resolve(String(x));
return String(x);
});
paths = globby.sync(paths, {nonull: true});
paths = paths.map(function (x) {
return path.resolve(x);
}).filter(function (x) {

@@ -18,0 +25,0 @@ return pathExists.sync(x);

2

lib/linux.js

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

var xdgTrashdir = require('xdg-trashdir');
var fs = pify.all(fsExtra, Promise);
var fs = pify(fsExtra, Promise);

@@ -11,0 +11,0 @@ function trash(src) {

{
"name": "trash",
"version": "3.1.2",
"version": "3.2.0",
"description": "Move files and folders to the trash",

@@ -44,4 +44,5 @@ "license": "MIT",

"fs-extra": "^0.24.0",
"globby": "^3.0.1",
"path-exists": "^2.0.0",
"pify": "^2.2.0",
"pify": "^2.3.0",
"pinkie-promise": "^1.0.0",

@@ -48,0 +49,0 @@ "run-applescript": "^2.0.0",

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

trash(['unicorn.png', 'rainbow.png']).then(() => {
trash(['*.png', '!rainbow.png']).then(() => {
console.log('done');

@@ -30,3 +30,14 @@ });

*You can use [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).**
## CLI
To install the [`trash`](https://github.com/sindresorhus/trash-cli) command, run:
```
$ npm install --global trash-cli
```
## Info

@@ -33,0 +44,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