Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created July 7, 2018 20:50
Embed
What would you like to do?
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