{"id":23274278,"url":"https://github.com/luncheon/simplify-svg-path","last_synced_at":"2026-03-27T02:28:07.121Z","repository":{"id":81428723,"uuid":"292768486","full_name":"luncheon/simplify-svg-path","owner":"luncheon","description":"Extracts `Path#simplify()` from Paper.js.","archived":false,"fork":false,"pushed_at":"2023-09-27T05:49:30.000Z","size":173,"stargazers_count":32,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-30T16:51:23.700Z","etag":null,"topics":["paper","paperjs","path","svg"],"latest_commit_sha":null,"homepage":"https://luncheon.github.io/simplify-svg-path/index.html","language":"JavaScript","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/luncheon.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":"2020-09-04T06:30:10.000Z","updated_at":"2024-06-18T19:48:45.172Z","dependencies_parsed_at":"2024-06-18T20:00:04.945Z","dependency_job_id":null,"html_url":"https://github.com/luncheon/simplify-svg-path","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"537ad2b2dd5c5f1259425ac213fbc66f1fabd1a2"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luncheon%2Fsimplify-svg-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luncheon%2Fsimplify-svg-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luncheon%2Fsimplify-svg-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luncheon%2Fsimplify-svg-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luncheon","download_url":"https://codeload.github.com/luncheon/simplify-svg-path/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494926,"owners_count":18235047,"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","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":["paper","paperjs","path","svg"],"created_at":"2024-12-19T20:12:44.056Z","updated_at":"2026-03-27T02:28:02.100Z","avatar_url":"https://github.com/luncheon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simplify-svg-path\n\nExtracts `Path#simplify()` from Paper.js.  \nhttp://paperjs.org/reference/path/#simplify\n\n## Installation \u0026 Usage\n\n### [npm](https://www.npmjs.com/package/@luncheon/simplify-svg-path)\n\n```bash\n$ npm i @luncheon/simplify-svg-path\n```\n\n```javascript\nimport simplifySvgPath from '@luncheon/simplify-svg-path'\n\nconst points = [[10, 10], [10, 20], [20, 20]];\nconst path = simplifySvgPath(points);\n// \"M10,10c0,3.33333 -2.35702,7.64298 0,10c2.35702,2.35702 6.66667,0 10,0\"\n```\n\n### CDN ([jsDelivr](https://www.jsdelivr.com/package/npm/@luncheon/simplify-svg-path))\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@luncheon/simplify-svg-path@0.2.0\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const path = simplifySvgPath([[10, 10], [10, 20], [20, 20]]);\n\u003c/script\u003e\n```\n\n## API\n\n```ts\nsimplifySvgPath(\n  points: [x: number, y: number][], // `{ x: number, y: number }[]` is also acceptable\n  {\n    closed: boolean = false,\n    tolerance: number = 2.5,\n    precision: number = 5,\n  } = {}\n): string\n\n// SVG path command string such as\n// \"M10,10c0,3.33333 -2.35702,7.64298 0,10c2.35702,2.35702 6.66667,0 10,0\"\n```\n\n## Note\n\nThe logic is a copy of Paper.js v0.12.11.  \nIf you like this, please send your thanks and the star to [Paper.js](https://github.com/paperjs/paper.js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluncheon%2Fsimplify-svg-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluncheon%2Fsimplify-svg-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluncheon%2Fsimplify-svg-path/lists"}