Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created July 7, 2018 20:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Comandeer/9e2fd36e03ff6fc072a333eb76ea8382 to your computer and use it in GitHub Desktop.
getSettings helper function boilerplate
function getSettings( { template, style, script } ) {
return {
template,
style,
script
};
}
[…]
function loadComponent( URL ) {
return fetchAndParse( URL ).then( getSettings ).then( registerComponent );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment