Skip to content

Instantly share code, notes, and snippets.

@shuantsu-zz
Created March 2, 2020 12:18
Show Gist options
  • Save shuantsu-zz/ad8219becd3f257bbf769e40608b7857 to your computer and use it in GitHub Desktop.
Save shuantsu-zz/ad8219becd3f257bbf769e40608b7857 to your computer and use it in GitHub Desktop.
const does = (container) => ({
"contain": (what) => {
return container.indexOf(what) > -1;
},
});
const name = "Filipe Teixeira";
if ( does(name).contain("Teixeira") ) {
console.log("Você é Teixeira");
} else {
console.log("Você não é Teixeira")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment