Skip to content

Instantly share code, notes, and snippets.

@jsatk
Last active January 17, 2018 01:07
Show Gist options
  • Save jsatk/c20df47a1b876622a4ab2af18c412192 to your computer and use it in GitHub Desktop.
Save jsatk/c20df47a1b876622a4ab2af18c412192 to your computer and use it in GitHub Desktop.
const options = {
async: true,
page: 4
};
const awesomeFunction = options => {
if (!options.offset) {
options.offset = 10;
}
// do stuff with options
};
awesomeFunction(options);
someOtherFunction(options);
yetAnotherFunction(options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment