1.1.5 • Published 4 years ago

@zhangfuxing/rmdir v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

rmdir

remove directory by nodejs

Install

$ npm i @zhangfuxing/rmdir

Useage

use nodejs fs

const rmdir = require('@zhangfuxing/rmdir');
const dir = 'xxx';

(async () => {
  await rmdir(dir);
})().catch(console.error);

use shell by nodejs child_process

const rmdir = require('@zhangfuxing/rmdir/lib/shell');
const dir = 'xxx';

(async () => {
  await rmdir(dir);
})().catch(console.error);

Test

$ npm test