Searching an object tree structure
I'd prefer writing it like this:

dataSearcher = (element, identifier) -&gt; 
  return element if element.identifier is identifier
  for child in element.children
    found = dataSearcher child, identifier
    return found if found


Changes:


guard style instead of else (one less level of indentation)
postfix if (probably a question of style)
is instead of ==
shorter variable names