cointoss

1.0.1 • Public • Published

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");
}

Readme

Keywords

none

Package Sidebar

Install

npm i cointoss

Weekly Downloads

34

Version

1.0.1

License

MIT

Last publish

Collaborators

  • doctormckay