Skip to content

Instantly share code, notes, and snippets.

@DanielMSchmidt
Last active April 13, 2016 20:19
Show Gist options
  • Save DanielMSchmidt/c4e116c1eeffdce0509b7dd0390f6873 to your computer and use it in GitHub Desktop.
Save DanielMSchmidt/c4e116c1eeffdce0509b7dd0390f6873 to your computer and use it in GitHub Desktop.
function search(needle, haystack, limit) {
//...
}
// Some modules later
// Doh' wrong
// search('3.1415926', 1, '.');
// Damn it, which order was it again?
// search('3.1415926', '.' , 1);
search('.', '3.1415926', 1);
function search({needle, haystack, limit}) {
//...
}
// Some modules later
search({needle: '.', haystack: '3.1415926', limit: 1});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment