# remy

> remove files with emitter

Latest version **7.0.0** (published 2023-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install remy
pnpm add remy
yarn add remy
bun add remy
```

Provides the command `remy`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2023-08-09 |
| First published | 2015-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 4 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | remove, emitter |

## Links

- npm: https://www.npmjs.com/package/remy
- Repository: https://github.com/coderaiser/node-remy
- Issues: https://github.com/coderaiser/node-remy/issues
- npm.io page: https://npm.io/package/remy

## Dependencies (4)

- [glob](https://npm.io/package/glob.md) ^7.1.0
- [redzip](https://npm.io/package/redzip.md) ^3.0.0
- [findit2](https://npm.io/package/findit2.md) ^2.2.3
- [try-to-catch](https://npm.io/package/try-to-catch.md) ^3.0.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 7.0.0 (latest) — 2023-08-09
- 6.0.1 — 2021-02-27
- 6.0.0 — 2021-02-03
- 5.0.1 — 2020-02-26
- 5.0.0 — 2019-10-16
- 4.1.0 — 2018-10-23
- 4.0.3 — 2018-10-11
- 4.0.2 — 2018-10-11
- 4.0.1 — 2018-10-10
- 4.0.0 — 2018-09-28
- 3.0.2 — 2018-05-24
- 3.0.1 — 2018-05-04
- 3.0.0 — 2018-05-04
- 2.0.2 — 2018-05-02
- 2.0.1 — 2017-02-01
- … 7 more at https://npm.io/package/remy/versions

## README

# Remy [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

Remove files with emitter (also in `zip` packages).

## Global

`remy` can be installed globally with

```
npm i remy -g
```

And used this way:

```
Usage: remy [path]
Options:
  -h, --help      display this help and exit
  -v, --version   output version information and exit
```

## Local

`Remy` can be used localy. It will emit event on every copied file.
Good for making progress bars.

### Install

```
npm i remy --save
```

### How to use?

#### remy(from[, names])

- `from` - path to directory with files or directories to remove
- `names` - `array` of file names (optional)

```js
const remy = require('remy');
const cwd = process.cwd();
const abortOnError = false;

const rm = remy(cwd, ['LICENSE', 'README.md', 'package.json']);

rm.on('file', (name) => {
    console.log(name);
});

rm.on('directory', (name) => {
    console.log(name);
});

rm.on('progress', (percent) => {
    console.log(percent);
    
    if (percent >= 50) {
        rm.pause();
        rm.continue();
    }
});

rm.on('error', (error) => {
    rm.continue();
});

rm.on('end', () => {
    console.log('Removing ended up');
});
```

In case of starting example output should be similar to:

```
33%
67%
100%
Removing ended up
```

## Related

- [Copymitter](https://github.com/coderaiser/node-copymitter "Copymitter") - Copy files with emitter.
- [Jaguar](https://github.com/coderaiser/node-jaguar "Jaguar") - Pack and extract .tar.gz archives with emitter.
- [OneZip](https://github.com/coderaiser/node-onezip "OneZip") - Pack and extract zip archives with emitter.
- [Tar-to-zip](https://github.com/coderaiser/node-tar-to-zip "tar-to-zip") - Convert tar and tar.gz archives to zip.

## License

MIT

[NPMIMGURL]: https://img.shields.io/npm/v/remy.svg?style=flat
[BuildStatusURL]: https://github.com/coderaiser/node-remy/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/node-remy/workflows/Node%20CI/badge.svg
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/node-remy/badge.svg?branch=master&service=github
[NPMURL]: https://npmjs.org/package/remy "npm"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[CoverageURL]: https://coveralls.io/github/coderaiser/node-remy?branch=master

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