Skip to content

Instantly share code, notes, and snippets.

@craigw
Created July 20, 2009 19:20
Show Gist options
  • Select an option

  • Save craigw/150584 to your computer and use it in GitHub Desktop.

Select an option

Save craigw/150584 to your computer and use it in GitHub Desktop.
Person = {
// Push the implementation details of the database into a
// different object to keep Person clean.
//
database: AddressBook,
find: function(id) {
if(id == "all") {
return this.database.allCards();
} else {
return this.database.openCard(id);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment