function applyOptions(options) {
  const settings = {};
  options = options || {};
  Object.assign(settings, defaults, options);

  return settings;
}
function applyOptions(options) {
  const settings = {};
  options = options || {};
  Object.assign(settings, defaults, options);

  return settings;
}
function applyOptions ( options ) { const settings = { } ; options = options || { } ; Object . assign ( settings , defaults , options ) ; return settings ; }
Merge default options with overwrites and returns new object
Merge default options with overwrites and returns new object