Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@medikoo
Created July 2, 2015 10:56
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 medikoo/b2fd267118a373b20f60 to your computer and use it in GitHub Desktop.
Save medikoo/b2fd267118a373b20f60 to your computer and use it in GitHub Desktop.
['foo', 'bar', 'lorem'].some(function (val) { return obj.x === val; });
obj.getDescriptor('x').type.oneOf(obj.x, ['foo', 'bar', 'lorem']);
this.database.oneOf(obj.x, ['foo', 'bar', 'lorem']);
(new Set(['foo', 'bar', 'lorem'])).has(obj.x);
({ foo: true, bar: true, lorem: true })[obj.x];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment