npm.io
1.3.0 • Published 4 years ago

fiftyfifty

Licence
Unlicense
Version
1.3.0
Deps
0
Size
4 kB
Vulns
0
Weekly
0

fiftyfifty

Is it true or is it false?

Installation

npm install fiftyfifty@latest

How to use

This section describes how to use this package.

Default usage
import fiftyfifty from "fiftyfifty";

const x = fiftyfifty(); // x is `true` or `false`
Flip a coin
import { coinflip } from "fiftyfifty";

const coin = coinflip(); // coin is "heads" or "tails"
Advanced usage

Send trueValue and/or falseValue to fiftyfifty to set custom returns.

import fiftyfifty from "fiftyfifty";

const answer = fiftyfifty("right", "wrong");

console.log(answer); // "right" or "wrong"

Keywords