random-desserts
v0.2.2
Published
Generate random dessert names
Downloads
6
Readme
Random Desserts 🍨
Generate the names of random desserts 🦄.
Install
npm install random-desserts
Usage
React
import React from 'react';
import {
getRandomDessertsName,
getRandomDessert,
roll
} from 'random-desserts'
function App() {
return (
<div>
<p>{getRandomDessertsName()}</p>
<p>or</p>
<p>{getRandomDessert()}</p>
<p>or</p>
<p>{roll()}</p>
</div>
);
}
export default App;
Node.js
const rd = require('random-desserts');
console.log(`One random dessert: ${rd.getRandomDessertsName()}`);
console.log(`and another: ${rd.getRandomDessert()}`);
console.log(`or we could get one like this: ${rd.roll()}`);
console.log(`hell, let's just grab three different ones: ${rd.rollThree()}`);
console.log(`I'm still hungry, give me 20: ${rd.rollN(20)}`);
Development
Test
npm run test