Skip to content

Instantly share code, notes, and snippets.

@jyotty
Created May 10, 2011 01:56
Show Gist options
  • Select an option

  • Save jyotty/963793 to your computer and use it in GitHub Desktop.

Select an option

Save jyotty/963793 to your computer and use it in GitHub Desktop.
I can get used to this
for (var i = 0; i < unfiltered.length; i++) {
if (unfiltered[i].host in config.hosts &&
unfiltered[i].type_instance in config.hosts[unfiltered[i].host].type_instance) {
filtered.push(unfiltered[i]);
}
}
for item in unfiltered
if config.hosts[item.host]?.type_instance[item.type_instance]?
filtered.push item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment