Created
February 7, 2013 04:38
-
-
Save grey-code/4728599 to your computer and use it in GitHub Desktop.
AutoHotkey: inObj
This file contains 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
inObj(obj, ss, cs:=false, bv:=true) { | |
r := false | |
if (!cs && !bv) | |
return ObjHasKey(obj, ss) | |
for a, b in obj | |
if (r := !r ? (cs ? (ss == (bv ? b : a)) : (ss = b)) : r) | |
break ; stop loop if found | |
return r ? a : r | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment