0.1.5 • Published 6 years ago
@olivbau/rockpaperscissors.js v0.1.5
Table of contents
Installation
For Node.js
Installation via npm or yarn
#npm
npm install @olivbau/rockpaperscissors.js
#yarn
yarn add @olivbau/rockpaperscissors.js
Then import it
//CommonJS
var rps = require('@olivbau/rockpaperscissors.js');
//ES6
import rps from '@olivbau/rockpaperscissors.js';
For Browser
Include the umd javascript file (downloadable here)
<script src="path/to/rockpaperscissors.umd.js"></script>
Usage
import rps from '@olivbau/rockpaperscissors.js';
var playerA = rps.ROCK;
var playerB = rps.SCISSORS;
console.log(rps.play(playerA,playerB));
// returns 'rock'
Documentation
Check the full documentation here
Issue
Having problems or feature request? Check out the issue section. Make sure to check if an issue isn't already open for your problem.