Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 61x 43x 43x 43x 43x 43x | import { names } from "./data/orgs.js";
export const getOrgId = (githubUrl) => {
let orgname;
Eif (githubUrl.split("https://github.com/")[1]) {
orgname = githubUrl.split("https://github.com/")[1].split("/")[0];
const org = orgname.replace(/\s/g, "").trim().toLowerCase();
const id = names.get(org);
return id;
} else {
// TODO: Sean handle github url error
// eslint-disable-next-line
console.log(`error with github url: ${githubUrl}`);
return 11635254;
}
}
|