1.3.2 • Published 10 years ago

star-wars v1.3.2

Weekly downloads
3
License
BSD-2-Clause
Repository
github
Last release
10 years ago

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

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago