{"id":27555819,"url":"https://github.com/lepixeliste/agsjs","last_synced_at":"2026-02-22T23:10:09.036Z","repository":{"id":57174634,"uuid":"286506487","full_name":"lepixeliste/agsjs","owner":"lepixeliste","description":"A modern and lightweight AGS file parser for JavaScript","archived":false,"fork":false,"pushed_at":"2025-02-20T16:18:58.000Z","size":115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T07:29:55.322Z","etag":null,"topics":["ags","geotechnical","geotechnical-engineering","javascript-library","javscript","nodejs","nodejs-library","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://www.ags.org.uk","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/lepixeliste.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,"zenodo":null}},"created_at":"2020-08-10T15:05:37.000Z","updated_at":"2025-05-15T12:57:01.000Z","dependencies_parsed_at":"2024-03-29T07:29:45.301Z","dependency_job_id":"cee7b526-c347-461b-a079-f371bd4096e4","html_url":"https://github.com/lepixeliste/agsjs","commit_stats":null,"previous_names":["zecheshirecat/agsjs","lepixeliste/agsjs"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lepixeliste/agsjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepixeliste%2Fagsjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepixeliste%2Fagsjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepixeliste%2Fagsjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepixeliste%2Fagsjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lepixeliste","download_url":"https://codeload.github.com/lepixeliste/agsjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepixeliste%2Fagsjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29730344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: 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":["ags","geotechnical","geotechnical-engineering","javascript-library","javscript","nodejs","nodejs-library","typescript","typescript-library"],"created_at":"2025-04-19T17:43:06.497Z","updated_at":"2026-02-22T23:10:09.003Z","avatar_url":"https://github.com/lepixeliste.png","language":"TypeScript","readme":"# agsjs\n\nA modern and lightweight AGS file parser for JavaScript\n\n## Installation\n\n```javascript\nnpm install agsjs --save\n```\n\n## How to use\n\nDefault use as ES6 module\n\n```typescript\nimport { parse } from 'agsjs'\n\nasync function parseContent(fileUrl: string) {\n  const res = await fetch(fileUrl)\n  const content = await res.text()\n  const results = parse(content)\n  return results\n}\n```\n\nThe results are returned as a JavaScript Array parsed from the file content. It follows the tree-like structure of the file format.\n\nEvery entry of the array has three properties:\n- *heading*, a non-empty string of the group name\n- *columns* which contains an array of the group headings and group related informations\n- *rows* which contains an array of the formatted data according to the group headings\n\n## Convenience functions\n\n### find\nReturns a JavaScript `object` or `null` if heading is not found\n```typescript\nimport { parse, find } from 'agsjs'\n\nconst groups = parse(content)\nconst projGroup = find('PROJ', groups)\nconsole.log(projGroup)\n// { \"heading\": \"PROJ\", columns: [...], rows: [...] } OR null\n```\n\n### map\nReturns an array\nMatch group headings and rows to a custom JavaScript object with named keys as parameters\n```typescript\nimport { parse, find, map } from 'agsjs'\n\nconst groups = parse(content)\nconst projGroup = find('PROJ', groups)\nconst keys = [{\n  name: 'reference',\n  header: 'PROJ_ID'\n}, {\n  name: 'name',\n  header: 'PROJ_NAME',\n  required: true,\n  default: ''\n}, {\n  name: 'location',\n  header: 'PROJ_LOC'\n}, {\n  name: 'client',\n  header: 'PROJ_CLNT'\n}]\nconst dataset = map(projGroup, keys)\n```\n\n## License\n\n[MIT License](https://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepixeliste%2Fagsjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flepixeliste%2Fagsjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepixeliste%2Fagsjs/lists"}