# del-symlinks

> Delete symlinks using glob

Latest version **0.1.2** (published 2016-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install del-symlinks
pnpm add del-symlinks
yarn add del-symlinks
bun add del-symlinks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2016-11-01 |
| First published | 2016-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Guntur Poetra |
| Maintainers | guntur |
| Keywords | del, delete, find, remove, search, symlink, only, path, unlink, utility |

## Links

- npm: https://www.npmjs.com/package/del-symlinks
- Repository: https://github.com/iguntur/del-symlinks
- Homepage: https://github.com/iguntur/del-symlinks#readme
- Issues: https://github.com/iguntur/del-symlinks/issues
- npm.io page: https://npm.io/package/del-symlinks

## Dependencies (4)

- [pify](https://npm.io/package/pify.md) ^2.3.0
- [get-symlinks](https://npm.io/package/get-symlinks.md) ^1.0.0
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0
- [pinkie-promise](https://npm.io/package/pinkie-promise.md) ^2.0.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2016-11-01
- 0.1.1 — 2016-10-17
- 0.1.0 — 2016-10-17

## README

# del-symlinks [![Build Status](https://travis-ci.org/iguntur/del-symlinks.svg?branch=master)](https://travis-ci.org/iguntur/del-symlinks) [![npm](https://img.shields.io/npm/v/del-symlinks.svg?style=flat-square)](https://npmjs.com/package/del-symlinks)

> Delete symlinks using [glob](https://github.com/isaacs/minimatch#usage).


## Install

```
$ npm install --save del-symlinks
```


## Usage

**async**

``` js
const delSymlinks = require('del-symlinks');

delSymlinks(['/home/guntur/.*', '!/home/guntur/.*rc']).then(symlinks => {
	console.log('symlinks was deleted:\n', symlinks.join('\n'));
});
```


**sync**

```js
const delSymlinks = require('del-symlinks');

const symlinks = delSymlinks.sync(['/home/guntur/*']);

console.log('Symlinks was deleted:\n', symlinks.join('\n'));
```

## API

### delSymlinks(patterns, [options])

Returns a promise for an array of deleted symlinks paths.

### delSymlinks.sync(patterns, [options])

Returns an array of deleted symlinks paths.

- #### patterns
	Type: `string`, `array`

	See supported minimatch [patterns](https://github.com/isaacs/minimatch#usage).

	- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js)
	- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)

- #### options
	Type: `object`

	See the `node-glob` [options](https://github.com/isaacs/node-glob#options).

	**&middot; dryRun**

	Type: `boolean`<br>
	Default: `false`

	See symlinks what would be deleted instead of deleting
	```js
	delSymlinks(['/home/guntur/*', '/home/guntur/.*'], { dryRun: true }).then(symlinks => {
		console.log('Symlinks that would be deleted:\n', symlinks.join('\n'));
	});
	```


## Related

- [get-symlinks](https://github.com/iguntur/get-symlinks) - Get all symbolic link in directory
- [is-symbolic-link](https://github.com/iguntur/is-symbolic-link) - Check if PATH is symbolic link


## License

MIT © [Guntur Poetra](http://guntur.starmediateknik.com)

---
_Source: https://npm.io/package/del-symlinks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
