cointoss
v1.0.1
Published
Securely toss a coin
Downloads
152
Readme
cointoss
Toss a cryptographically secure coin.
What?
Exports a function that, when called, returns either true
or false
randomly and cryptographically securely.
Why?
Because if there's one thing npm needs more of, it's 3-line packages.
How?
const cointoss = require('cointoss');
if (cointoss()) {
console.log("Heads");
} else {
console.log("Tails");
}