UNPKG

olivieri-highlights

Version:

Initial attempt to create a package that returns quotations selected specifically by me

21 lines (15 loc) 524 B
/* How do I deal with the problem of anthologies? */ let highlights = require('./convert-marvin-highlights-to-array'); function randomIntFromInterval(min, max) { return Math.floor(Math.random() * (max - min + 1) + min) } let randomInteger = randomIntFromInterval(0, highlights.array.length); console.log(highlights.array.length); console.log(highlights.array[randomInteger]) module.exports = { randomQuote: function randomQuote() { return highlights.array[randomInteger]; } }