{"size": 482, "ext": "js", "max_stars_repo_path": "addon/utils/create-options.js", "max_stars_repo_name": "KidEma/ember-medium-editor", "max_stars_repo_stars_event_min_datetime": "2017-04-08T21:49:03.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-13T00:36:49.000Z", "max_issues_repo_path": "addon/utils/create-options.js", "max_issues_repo_name": "KidEma/ember-medium-editor", "max_issues_repo_issues_event_min_datetime": "2017-05-10T19:09:49.000Z", "max_issues_repo_issues_event_max_datetime": "2019-08-14T18:15:01.000Z", "max_forks_repo_path": "addon/utils/create-options.js", "max_forks_repo_name": "KidEma/ember-medium-editor", "max_forks_repo_forks_event_min_datetime": "2017-06-08T10:39:40.000Z", "max_forks_repo_forks_event_max_datetime": "2019-11-03T18:43:32.000Z"}
{"max_stars_count": 16, "max_issues_count": 9, "max_forks_count": 9, "avg_line_length": 26.7777777778, "max_line_length": 67, "alphanum_fraction": 0.6659751037}
import { assign } from '@ember/polyfills';

export default function createOptions(defaults, overrides = {}) {
  let result = assign({}, defaults);

  // merge defaults with new options
  for (let key in overrides) {
    if (overrides[key] !== undefined) result[key] = overrides[key];
  }

  // clean up result from undefined keys
  for (let key in result) {
    if (result[key] === undefined) delete result[key];
  }

  return Object.keys(result).length > 0 ? result : undefined;
}
