{"id":21762624,"url":"https://github.com/dawee/svg-flat-document","last_synced_at":"2026-05-15T18:03:47.656Z","repository":{"id":145644070,"uuid":"60278844","full_name":"dawee/svg-flat-document","owner":"dawee","description":"Parse and manipulate to a flat SVG object","archived":false,"fork":false,"pushed_at":"2016-07-19T19:16:08.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-23T18:42:12.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dawee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-06-02T16:14:15.000Z","updated_at":"2016-06-04T05:56:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac4a765d-f7d0-4314-9492-da940bac5328","html_url":"https://github.com/dawee/svg-flat-document","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dawee/svg-flat-document","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawee%2Fsvg-flat-document","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawee%2Fsvg-flat-document/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawee%2Fsvg-flat-document/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawee%2Fsvg-flat-document/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dawee","download_url":"https://codeload.github.com/dawee/svg-flat-document/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawee%2Fsvg-flat-document/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"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":[],"created_at":"2024-11-26T12:12:39.293Z","updated_at":"2026-05-15T18:03:47.641Z","avatar_url":"https://github.com/dawee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SVGFlatDocument\n\nES6 SVG document without tree (flat)\n\n## Install\n\n```\nnpm install svg-flat-document\n```\n\n## Usage\n\n## Parse from SVG string\n\n\n```js\nimport SVGFlatDocument from 'svg-flat-document';\n\nlet doc = SVGFlatDocument.parse(svgString);\n```\n\n*With svgString =*\n\n```xml\n\u003csvg width=100\u003e\n  \u003cg transform=\"translate(100, 0)\"\u003e\n    \u003crect id=\"me\" x=\"0\" y=\"0\" width=\"100\" height=\"200\" /\u003e\n  \u003c/g\u003e\n\u003c/svg\u003e\n```\n\n## Retreive element\n\n```js\n\nlet node = doc.mapping.me;\nlet attr = node.attributes;\n\nconsole.log(attr.x, attr.y, attr.width, attr.height);\n// 0 0 100 200\n\nconsole.log(attr.transform);\n// matrix(1,0,0,1,100,0)\n\n```\n\nSo groups are ignored and children absorb every parents transforms.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawee%2Fsvg-flat-document","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdawee%2Fsvg-flat-document","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawee%2Fsvg-flat-document/lists"}