Skip to content

Instantly share code, notes, and snippets.

@owfm
Last active May 9, 2020 17:06
Show Gist options
  • Save owfm/5b1e5e83bf7c2f044b1e7f0996a36196 to your computer and use it in GitHub Desktop.
Save owfm/5b1e5e83bf7c2f044b1e7f0996a36196 to your computer and use it in GitHub Desktop.
// 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