{"id":16125712,"url":"https://github.com/dy/svg-path-bounds","last_synced_at":"2025-10-25T08:33:38.485Z","repository":{"id":57375531,"uuid":"98036710","full_name":"dy/svg-path-bounds","owner":"dy","description":"Get boundary box of svg path data","archived":false,"fork":false,"pushed_at":"2025-01-20T02:49:15.000Z","size":35,"stargazers_count":69,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-13T20:49:08.636Z","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/dy.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":"2017-07-22T14:31:52.000Z","updated_at":"2025-06-27T02:19:37.000Z","dependencies_parsed_at":"2025-04-10T02:41:16.942Z","dependency_job_id":"f4d2f5fa-6c55-4a6d-91a3-51b67a269af4","html_url":"https://github.com/dy/svg-path-bounds","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"f3def6845d39eeadc2c274b1b6a42ebf1ced8e13"},"previous_names":["dfcreative/svg-path-bounds"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dy/svg-path-bounds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fsvg-path-bounds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fsvg-path-bounds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fsvg-path-bounds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fsvg-path-bounds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dy","download_url":"https://codeload.github.com/dy/svg-path-bounds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fsvg-path-bounds/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268548058,"owners_count":24267779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-09T21:30:53.978Z","updated_at":"2025-10-25T08:33:38.392Z","avatar_url":"https://github.com/dy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svg-path-bounds [![test](https://github.com/dy/svg-path-bounds/actions/workflows/test.yml/badge.svg)](https://github.com/dy/svg-path-bounds/actions/workflows/test.yml)\n\nRetrieve bounding box from svg path data.\n\n[![npm install svg-path-bounds](https://nodei.co/npm/svg-path-bounds.png?mini=true)](https://npmjs.org/package/svg-path-bounds/)\n\n```js\nconst getBounds = require('svg-path-bounds')\n\nlet [left, top, right, bottom] = getBounds('M0 0L10 10 20 0Z') // [0, 0, 20, 10]\n```\n\n### bounds = getBounds(path|segments)\n\nCalculate bounding box for [svg path data](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d) string or [parsed path segments](https://www.npmjs.com/package/parse-svg-path) array. The box is detected by controlling points, not the real path.\n\n## Related\n\n* [parse-svg-path](https://npmjs.org/parse-svg-path) - return svg path data segments\n* [abs-svg-path](https://npmjs.org/abs-svg-path) - convert svg path to absolute values\n* [rel-svg-path](https://npmjs.org/abs-svg-path) - convert svg path to relative values\n* [normalize-svg-path](https://npmjs.org/normalize-svg-path) - make path consist of only bezier curve segments\n* [draw-svg-path](https://npmjs.org/draw-svg-path) - create canvas shape based on svg path data\n* [normalize-svg-coords](https://npmjs.org/normalize-svg-coords) - bring svg path coordinates to any linear range\n\n## Similar\n\n* [svg-boundings](https://www.npmjs.com/package/svg-boundings)\n* [svg-path-bounding-box](https://github.com/icons8/svg-path-bounding-box)\n\n## License\n\nMIT © Dmitry Iv.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fsvg-path-bounds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdy%2Fsvg-path-bounds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fsvg-path-bounds/lists"}