Last active
July 6, 2018 13:07
-
-
Save lupomontero/82840b0cc0d26bd6b9c37fbdbdebb22f 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
exports.uniq = arr => arr.reduce( | |
(prev, item) => (prev.indexOf(item) === -1) ? prev.concat(item) : prev, | |
[], | |
); | |
exports.pluck = (arr, prop) => arr.map(obj => obj[prop]); | |
exports.extractCampus = cohortids => | |
cohortids.map(item => item.slice(0, item.indexOf('-'))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment