@ominestre/rummerf
v1.1.0
Published
Rummerf is a module for performing recursive directory deletions limited to the scope of your project to prevent tragedies
Downloads
6
Readme
rummerf
Rummerf is an "rm -rf" deletion tool with set scoping. When you initialize rummerf it either uses a path you provide or your Current Working Directory to limit the scope of deletions. For example if my CWD is /path/foo/bar and I attempt to delete a file within /path/foo it will throw an exception.
Usage
Using default CWD
const rummerf = require('@ominestre/rummerf');
rummerf('/path/to/delete/');
Using a specified scope
const rummerf = require('@ominestre/rummerf').init('/my/project/scope/');
rummerf('/my/project/scope/delete.js');
Currently rummerf requires an absolute path so it's recommended you use NodeJS path.resolve.