<commit_before># del [![Build Status](https://travis-ci.org/sindresorhus/del.svg?branch=master)](https://travis-ci.org/sindresorhus/del)

> Delete files/folders using [globs](https://github.com/isaacs/minimatch#usage)

Pretty much [rimraf](https://github.com/isaacs/rimraf) with support for multiple files and globbing.  
It also protects you against deleting the current working directory and above.


## Install

```sh
$ npm install --save del
```


## Usage

```js
var del = require('del');

del(['tmp/*.js', '!tmp/unicorn.js'], function (err, deletedFiles) {
	console.log('Files deleted:', deletedFiles.join(', '));
});
```


## API

### del(patterns, [options], callback)
### del.sync(patterns, [options])

The async method gets an array of deleted files as the second argument in the callback, while the sync method returns the array.

#### patterns

**Required**  
Type: `string`, `array`
<commit_msg>readme tweaks<commit_after># del [![Build Status](https://travis-ci.org/sindresorhus/del.svg?branch=master)](https://travis-ci.org/sindresorhus/del)

> Delete files/folders using [globs](https://github.com/isaacs/minimatch#usage)

Pretty much [rimraf](https://github.com/isaacs/rimraf) with support for multiple files and globbing.  
It also protects you against deleting the current working directory and above.


## Install

```sh
$ npm install --save del
```


## Usage

```js
var del = require('del');

del(['tmp/*.js', '!tmp/unicorn.js'], function (err, paths) {
	console.log('Deleted files/folders:\n', paths.join('\n'));
});
```


## API

### del(patterns, [options], callback)
### del.sync(patterns, [options])

The async method gets an array of deleted paths as the second argument in the callback, while the sync method returns the array.

#### patterns

**Required**  
Type: `string`, `array`

{'fraction_non_alphanumeric': 0.16887417218543047, 'fraction_numerical': 0.0, 'mean_word_length': 4.848387096774194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '160703', 'n_tokens_mistral': 599, 'n_tokens_neox': 578, 'n_words': 167}