Created
July 2, 2015 10:56
-
-
Save medikoo/b2fd267118a373b20f60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['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