Skip to content

Instantly share code, notes, and snippets.

@owfm
Last active May 12, 2020 09:06
Show Gist options
  • Save owfm/d977cc61dc0ed8c6639809e518f69d24 to your computer and use it in GitHub Desktop.
Save owfm/d977cc61dc0ed8c6639809e518f69d24 to your computer and use it in GitHub Desktop.
// generateProposal.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",
"Head Gardener",
"Chief Baker",
"CTO",
"Nobel Comittee Member",
];
const names = [
"Ollie Mansell",
"Terry Pratchett",
"Jane Goodall",
"Marie Curie",
"Jane Fonda",
"Winston Churchill",
"Henry VIII",
"Noam Chomsky",
"The Dalai Lama",
"Derrick Bell",
"Elvis Presely",
"Danny Rampling",
"Paul Dirac",
];
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