Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

headflip

mlucap3ISC1.0.2

Easy coin toss. Allows for results in heads or tails, true and false, or 1 and 0.

readme

Headflip

Easy coin toss. Allows for results in heads or tails, true and false, or 1 and 0.

Installation

npm i headflip --save

Usage

const headflip = require('headflip')

console.log(headflip())
// heads or tails

console.log(headflip('num'))
// 1 or 0

console.log(headflip('bool'))
// true or false