star-wars
v1.3.2
Published
Use the --force, Luke
Downloads
19
Readme
star-wars
Use the --force
, Luke.
This is a tiny module that wants to check whether you're using --force
or force
when calling your CLI tool.
Usage
var starwars = require('star-wars');
starwars(process.argv);
When you run your CLI tool without adding either --force
or force
, the return value of star-wars
will be false.
Use it for checks in your application where you need to be sure that the user intends to do the action they just tried.
var starwars = require('star-wars');
if (starwars(process.argv)) {
// do the intended action
} else {
console.log('Do or do not, there is no try');
};
tl;dr
Pass this module process.argv
and it'll return true if your CLI tool has been called with --force
or force