{"size": 315, "ext": "js", "max_stars_repo_path": "src/00-js/06-new/old/20210922/01.js", "max_stars_repo_name": "crazyvalse/algorithms", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/00-js/06-new/old/20210922/01.js", "max_issues_repo_name": "crazyvalse/algorithms", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/00-js/06-new/old/20210922/01.js", "max_forks_repo_name": "crazyvalse/algorithms", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.0, "max_line_length": 54, "alphanum_fraction": 0.6380952381}
/**
 * 1. 创建一个 obj
 * 2. 把方法的 this 指向给 obj
 * 3. 定义 __proto__
 * @param fn
 */
module.exports = function ObjectFactory(fn, ...args) {
  const obj = {
    __proto__: fn.prototype,
    constructor: fn.prototype.constructor
  }
  const result = fn.apply(obj, args)
  return typeof result === 'object' ? result : obj
}
