{"id":13393676,"url":"https://github.com/elrumordelaluz/path-that-svg","last_synced_at":"2025-04-15T06:50:44.396Z","repository":{"id":32494948,"uuid":"135413859","full_name":"elrumordelaluz/path-that-svg","owner":"elrumordelaluz","description":"Path that SVG!","archived":false,"fork":false,"pushed_at":"2023-01-06T01:57:54.000Z","size":590,"stargazers_count":61,"open_issues_count":11,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T23:01:56.015Z","etag":null,"topics":["path","svg","svg-converter","svg-path"],"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/elrumordelaluz.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}},"created_at":"2018-05-30T08:39:39.000Z","updated_at":"2024-11-11T08:42:17.000Z","dependencies_parsed_at":"2023-01-14T21:24:16.734Z","dependency_job_id":null,"html_url":"https://github.com/elrumordelaluz/path-that-svg","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Fpath-that-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Fpath-that-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Fpath-that-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Fpath-that-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elrumordelaluz","download_url":"https://codeload.github.com/elrumordelaluz/path-that-svg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023708,"owners_count":21199958,"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":["path","svg","svg-converter","svg-path"],"created_at":"2024-07-30T17:00:58.503Z","updated_at":"2025-04-15T06:50:44.351Z","avatar_url":"https://github.com/elrumordelaluz.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Path that SVG!\" title=\"Path that SVG!\" src=\"https://cdn.rawgit.com/elrumordelaluz/path-that-svg/32de7c4d/logo.svg\" width=\"450\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Sometimes is useful to have an \u003ccode\u003esvg\u003c/code\u003e done with \u003ccode\u003epath\u003c/code\u003es instead of elements \u003cbr /\u003e\n  such as \u003ccode\u003erect\u003c/code\u003e, \u003ccode\u003ecircle\u003c/code\u003e, \u003ccode\u003eellipse\u003c/code\u003e, \u003ccode\u003eline\u003c/code\u003e, \u003ccode\u003epolyline\u003c/code\u003e or \u003ccode\u003epolygon\u003c/code\u003e. \u003cbr/\u003e\n  Like when you apply \u003cem\u003eCompound Path\u003c/em\u003e in \u003cem\u003eAdobe Illustrator\u003c/em\u003e.\n\u003c/p\u003e\n\n## Install\n\n```zsh\nyarn add path-that-svg\n```\n\n## Usage\n\n`String|Buffer` svg\n\n```js\nconst { pathThatSvg } = require('path-that-svg')\n\nfs.readFile('./elements.svg', (err, input) =\u003e {\n  pathThatSvg(input).then((convertedFromBuffer) =\u003e {\n    console.log({ convertedFromBuffer })\n  })\n})\n\npathThatSvg(`\u003csvg viewBox=\"0 0 500 200\"\u003e\n  \u003crect \n    x=\"200\" \n    y=\"50\" \n    fill=\"#F16362\" \n    stroke=\"#30456B\" \n    stroke-width=\"5\" \n    stroke-linecap=\"round\" \n    stroke-linejoin=\"round\" \n    width=\"100\" height=\"100\"/\u003e\n\u003c/svg\u003e`).then((convertedFromString) =\u003e {\n  console.log(convertedFromString)\n})\n```\n\n## Related\n\n[element-to-path](https://github.com/elrumordelaluz/element-to-path) Convert SVG element into `path`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felrumordelaluz%2Fpath-that-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felrumordelaluz%2Fpath-that-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felrumordelaluz%2Fpath-that-svg/lists"}