{"id":19398987,"url":"https://github.com/hyfi06/unam-careers","last_synced_at":"2026-05-16T10:32:58.011Z","repository":{"id":182921544,"uuid":"669314227","full_name":"hyfi06/unam-careers","owner":"hyfi06","description":"A utility package for retrieving career information from UNAM.","archived":false,"fork":false,"pushed_at":"2023-07-22T07:13:46.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T16:10:35.704Z","etag":null,"topics":["career","data","npm-package","unam"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@hyfi06/unam-careers","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyfi06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-21T22:36:18.000Z","updated_at":"2023-07-22T07:17:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"25fdeac0-7281-4970-85a9-798c1ec7e3bb","html_url":"https://github.com/hyfi06/unam-careers","commit_stats":null,"previous_names":["hyfi06/unam-careers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hyfi06/unam-careers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyfi06%2Funam-careers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyfi06%2Funam-careers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyfi06%2Funam-careers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyfi06%2Funam-careers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyfi06","download_url":"https://codeload.github.com/hyfi06/unam-careers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyfi06%2Funam-careers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33098797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["career","data","npm-package","unam"],"created_at":"2024-11-10T11:07:52.332Z","updated_at":"2026-05-16T10:32:57.981Z","avatar_url":"https://github.com/hyfi06.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @hyfi06/unam-careers\n\nA utility package for retrieving career information from UNAM.\n\n## Install\n\nYou can install this package using npm:\n\n```bash\nnpm install --save @hyfi06/unam-careers\n```\n\n## Usage\n\nHere is an example of how to use the getCareerById function:\n\n```javascript\nconst { getCareerById } = require('@hyfi06/unam-careers');\n\nconst id = 101;\nconst career = getCareerById(id);\n\nconsole.log(career); \n// Prints the career with id 101 { id: 101, name: 'Actuaría', alias: ['ACTUARIA', 'ACT'], siassId: 1, dgeciId: 11 }\n```\n\nAnd here is an example of how to use the getCareerByName function:\n\n```javascript\nCopy code\nconst { getCareerByName } = require('@hyfi06/unam-careers');\n\nconst careerName = 'Actuaría';\nconst career = getCareerByName(careerName);\n\nconsole.log(career); \n// Prints the career with name 'Actuaría' { id: 101, name: 'Actuaría', alias: ['ACTUARIA', 'ACT'], siassId: 1, dgeciId: 11 }\n```\n\n## Functions\n\n- [`getCareerById(id: number): CareerItem`](#function-getcareerbyid): Retrieves a career from the `CAREERS` array by its `id`. Throws an error if no career with the specified ID is found.\n\n- [`getCareerByName(careerName: string): CareerItem`](#function-getcareerbyname): Retrieves a career from the `CAREERS` array by its name. It sanitizes the input string by removing accents and converting to uppercase before comparing it with the career aliases. Throws an error if no career with the specified name is found.\n\n### Function: getCareerById\n\nThe `getCareerById` function retrieves a career by its `id`.\n\n#### Parameters\n\n- `id` (number): The ID of the career to retrieve.\n\n#### Returns\n\n- (CareerItem): The career with the specified ID.\n\n#### Throws\n\n- (Error): If no career with the specified ID is found.\n\n#### Example\n\n```javascript\nconst id = 101;\nconst career = getCareerById(id);\n// career is { id: 101, name: 'Actuaría', alias: ['ACTUARIA', 'ACT'], siassId: 1, dgeciId: 11 }\n```\n\n### Function: getCareerByName\n\nThe `getCareerByName` function retrieves a career from the `CAREERS` array by its name. It sanitizes the input string by removing accents and converting to uppercase before comparing it with the career aliases.\n\n#### Parameters\n\n- `careerName` (string): The name of the career to retrieve.\n\n#### Returns\n\n- (CareerItem): The career with the specified name.\n\n#### Throws\n\n- (Error): If no career with the specified name is found.\n\n#### Example\n\n```javascript\nconst careerName = 'Actuaría';\nconst career = getCareerByName(careerName);\n// career is { id: 101, name: 'Actuaría', alias: ['ACTUARIA', 'ACT'], siassId: 1, dgeciId: 11 }\n```\n\n## Copyright\n\nCopyright (c) 2023 Héctor Olvera Vital\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE), which means you are free to use, modify, and distribute the code for both commercial and non-commercial purposes. However, the software is provided \"as is,\" without any warranty or guarantee of its effectiveness or suitability for your specific needs. [Please review the license file for more details](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyfi06%2Funam-careers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyfi06%2Funam-careers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyfi06%2Funam-careers/lists"}