Socket
Socket
Sign inDemoInstall

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 5.0.0 to 5.1.0

52

index.d.ts

@@ -1,18 +0,38 @@

export interface Options {
/**
* Enable globbing when matching file paths.
*
* @default true
*/
readonly glob?: boolean;
declare namespace trash {
interface Options {
/**
Enable globbing when matching file paths.
@default true
*/
readonly glob?: boolean;
}
}
/**
* Move files and folders to the trash.
*
* @param input - Accepts paths and [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
*/
export default function trash(
input: string | string[],
options?: Options
): Promise<void>;
declare const trash: {
/**
Move files and folders to the trash.
@param input - Accepts paths and [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
@example
```
import trash = require('trash');
(async () => {
await trash(['*.png', '!rainbow.png']);
})();
```
*/
(input: string | string[], options?: trash.Options): Promise<void>;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function trash(
// input: string | string[],
// options?: Options
// ): Promise<void>;
// export = trash;
default: typeof trash;
};
export = trash;

@@ -56,2 +56,3 @@ 'use strict';

module.exports = trash;
// TODO: Remove this for the next major release
module.exports.default = trash;
{
"name": "trash",
"version": "5.0.0",
"version": "5.1.0",
"description": "Move files and folders to the trash",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -47,15 +47,15 @@ "files": [

"make-dir": "^1.3.0",
"move-file": "^1.0.0",
"move-file": "^1.1.0",
"p-map": "^2.0.0",
"p-try": "^2.0.0",
"run-applescript": "^3.0.0",
"uuid": "^3.1.0",
"p-try": "^2.2.0",
"run-applescript": "^3.2.0",
"uuid": "^3.3.2",
"xdg-trashdir": "^2.1.1"
},
"devDependencies": {
"ava": "^1.0.0-rc.1",
"ava": "^1.4.1",
"tempfile": "^2.0.0",
"tsd-check": "^0.3.0",
"tsd": "^0.7.1",
"xo": "^0.24.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