New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

remy

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remy

remove files with emitter

latest
Source
npmnpm
Version
7.0.0
Version published
Weekly downloads
1.2K
243.64%
Maintainers
1
Weekly downloads
 
Created
Source

Remy License NPM version Build Status Coverage Status

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)
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
  • Copymitter - Copy files with emitter.
  • Jaguar - Pack and extract .tar.gz archives with emitter.
  • OneZip - Pack and extract zip archives with emitter.
  • Tar-to-zip - Convert tar and tar.gz archives to zip.

License

MIT

Keywords

remove

FAQs

Package last updated on 09 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts