Created
June 22, 2010 07:24
-
-
Save mattmccray/448127 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
| person: { | |
| name: 'matt' | |
| age: 34 | |
| } | |
| ok 'name' of person # OF tests object property names | |
| ok 'matt' in person # IN tests object values (CURRENTLY FAILS) | |
| brothers: ['matt', 'dan', 'sam'] | |
| ok 'matt' in brothers # IN tests object values | |
| ok 0 of brothers # OF tests object property names |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Although, come to think of it...
Makes sense when it's an array. But JS already uses
infor testing keys against objects, so perhaps my suggestion is counterintuitive. Eh?