yarn add fifty-two-challenge # npm install fifty-two-challenge
const { generate } = require('fifty-two-challenge')
generate({
initialValue: 5,
weeks: 4
}) // return a array of weeks
Generate an array of weeks with corresponding values from each week
options
: An object with two fields:
- initialValue: initial value to generate data. Default is 2
- weeks: number of weeks. Default is 52
- Array of weeks: the week object is a object with value and week fields
Emanuel Gonçalves
- Twitter @emanuelgsouza
- Github @emanuelgsouza