Skip to content

Instantly share code, notes, and snippets.

@jamesplease
Created May 2, 2018 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesplease/94beb1ad7f2b42b4357c8fbc6611f9ef to your computer and use it in GitHub Desktop.
Save jamesplease/94beb1ad7f2b42b4357c8fbc6611f9ef to your computer and use it in GitHub Desktop.
// Originally, it was like this
{
resources: {
books: {
// This shit is secret, and should not be exposed to the users.
__internalInfoAboutBooks: {},
resources: {
24: { ... },
50: { ... }
}
}
}
}
// Now, the metadata is stored in a separate object that is never exposed to the user
{
resources: {
books: {
24: { ... },
50: { ... }
}
}
}
// here is that separate object...
{
resources: {
books: {
__internalInfoAboutBooks: {}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment