Skip to content

Instantly share code, notes, and snippets.

View benprime's full-sized avatar

Ben Smith benprime

View GitHub Profile
const privateStatusEnum = {
UNHARMED: 0,
LIGHTLY_WOUNDED: 1,
MODERATELY_WOUNDED: 2,
SEVERELY_WOUNDED: 3,
INCAPACITATED: 4,
};
const handler = {
get: (obj, prop) => {
const StatusEnum = {
UNHARMED: 0,
LIGHTLY_WOUNDED: 1,
MODERATELY_WOUNDED: 2,
SEVERELY_WOUNDED: 3,
INCAPACITATED: 4,
};
// later in the code...
player.status = StatusEnum.UNHAMRED; // typo