Skip to content

Instantly share code, notes, and snippets.

@jwulf
Last active February 26, 2020 01:40
Show Gist options
  • Save jwulf/a0664d542037c385b81e8495811c537d to your computer and use it in GitHub Desktop.
Save jwulf/a0664d542037c385b81e8495811c537d to your computer and use it in GitHub Desktop.
const GlobalMemberStore = (() => {
let _members = []
const needsArg = arg => {
if (!member) {
throw new Error (`Undefined passed as argument to Store!`)
}
return arg
}
const needsId = member => {
if (!member.id) {
throw new Error (`Undefined id on member passed as argument to Store!`)
}
return member
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment