{"size": 401, "ext": "js", "max_stars_repo_path": "src/js/util/btn.js", "max_stars_repo_name": "childsr/grav-racer", "max_stars_repo_stars_event_min_datetime": "2018-09-16T16:06:49.000Z", "max_stars_repo_stars_event_max_datetime": "2018-09-18T19:09:31.000Z", "max_issues_repo_path": "src/js/util/btn.js", "max_issues_repo_name": "childsr/grav-racer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/util/btn.js", "max_forks_repo_name": "childsr/grav-racer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.5882352941, "max_line_length": 44, "alphanum_fraction": 0.5436408978}
const btn = (x, y, w, h) => draw => {
  const box = rect(x, y, w, h)
  let click = false
  const listener = () => {
    if (box(input.mouse_pos)) {
      click = true
    }
  }
  window.addEventListener('click', listener)
  return () => {
    const a = box(input.mouse_pos) ? 1 : 0.5
    const drawf = q.a(a)(q.xy(x,y)(draw))
    const clickr = click
    click = false
    return [drawf, clickr]
  }
}