Created
November 13, 2018 19:05
-
-
Save mearns/4cac09b76155d502ca12bdaef1f9cd57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `npm install --save build-object-better` | |
const bob = require('build-object-better') | |
const dayNamesInOrder = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] | |
const daysOfTheWeek = bob(dayNamesInOrder, (dayName, idx) => idx) | |
const studentGradeCache = bob(studentNames, lookupStudentGrade) | |
const perfectSquaresMemo = bob([ | |
0, 1, 2, 3, 4, 5, 6 | |
], (input) => input * input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment