Last active
May 9, 2020 17:06
-
-
Save owfm/5b1e5e83bf7c2f044b1e7f0996a36196 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
// proposePromotion.js | |
"use-strict"; | |
import sample from "lodash/sample"; | |
export const call = (event, context, callback) => { | |
const roles = [ | |
"Tea Fetcher", | |
"CEO", | |
"Sous Chef", | |
"Head Matron", | |
"Team Captain", | |
]; | |
const names = [ | |
"Ollie Mansell", | |
"Terry Pratchett", | |
"Jane Goodall", | |
"Marie Curie", | |
]; | |
const promotionProposal = { | |
employeeName: sample(names), | |
proposedRole: sample(roles), | |
mostRecent360Score: Math.floor(Math.random() * 100), | |
recentDisciplinaries: Math.floor(Math.random() * 5), | |
}; | |
return callback(null, promotionProposal); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment