{"size": 361, "ext": "js", "max_stars_repo_path": "src/app/lib/redirect.js", "max_stars_repo_name": "supran2811/tripmark", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app/lib/redirect.js", "max_issues_repo_name": "supran2811/tripmark", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/app/lib/redirect.js", "max_forks_repo_name": "supran2811/tripmark", "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": 24.0666666667, "max_line_length": 71, "alphanum_fraction": 0.5844875346}
import { Router } from "../../routes";

export default (res, target) => {
  if (res) {
    // server
    // 303: "See other"
   
    res.writeHead(303, { Location: target });
    res.end();
  } else if(window) {
    // In the browser, we just pretend like this never even happened ;)
    // Router.replaceRoute(target);
    window.location.href = target;
  }
};