{"id":13447545,"url":"https://github.com/elrumordelaluz/outline-stroke","last_synced_at":"2025-04-13T05:38:07.704Z","repository":{"id":27274481,"uuid":"112605534","full_name":"elrumordelaluz/outline-stroke","owner":"elrumordelaluz","description":"Convert stroked SVG into the outlined version","archived":false,"fork":false,"pushed_at":"2023-04-14T17:57:48.000Z","size":934,"stargazers_count":129,"open_issues_count":14,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T19:38:54.934Z","etag":null,"topics":["outline-stroke","stroke","svg","svg-path"],"latest_commit_sha":null,"homepage":"https://outline-stroke.vercel.app/","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-30T11:51:17.000Z","updated_at":"2025-04-07T17:31:39.000Z","dependencies_parsed_at":"2024-06-18T20:14:35.581Z","dependency_job_id":null,"html_url":"https://github.com/elrumordelaluz/outline-stroke","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":"0.019230769230769273","last_synced_commit":"8443f6941132073f5118d6ce7606b30b8ef5e18b"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Foutline-stroke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Foutline-stroke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Foutline-stroke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrumordelaluz%2Foutline-stroke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elrumordelaluz","download_url":"https://codeload.github.com/elrumordelaluz/outline-stroke/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670506,"owners_count":21142897,"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":["outline-stroke","stroke","svg","svg-path"],"created_at":"2024-07-31T05:01:20.626Z","updated_at":"2025-04-13T05:38:07.583Z","avatar_url":"https://github.com/elrumordelaluz.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Outline Stroke\" title=\"Outline Stroke\" src=\"/logo.svg\" width=\"450\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Sometimes you need an \u003ccode\u003esvg\u003c/code\u003e image that have \u003ccode\u003estroke\u003c/code\u003ed attributes in its\n  \u003ccode\u003epaths\u003c/code\u003e but \u003cstrong\u003eoutlined\u003c/strong\u003e like after applying \u003cem\u003eOutline Stroke\u003c/em\u003e in \u003cem\u003eAdobe Illustrator\u003c/em\u003e or \u003cem\u003eConvert to Outlines\u003c/em\u003e in \u003cem\u003eSketchApp\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/elrumordelaluz/outline-stroke\"\u003e\n    \u003cimg src=\"https://travis-ci.org/elrumordelaluz/outline-stroke.svg?branch=master\" alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Install\n\n```zsh\nyarn add svg-outline-stroke\n```\n\n## Usage\n\n\u003e **Note to output quality:** Consider that svg-outline-troke traces the outline version from a bitmap copy of the input so, bigger is the input, most accurate is the traced version (also with lot more path points). If the output quality is insufficient simply provide a larger scaled SVG into the tool (see width, height and viewBox attributes).\n\n`String` input:\n\n```js\nconst outlineStroke = require('svg-outline-stroke')\n\nconst strokedSVG = `\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"\u003e\n  \u003cline x1=\"32\" y1=\"16\" x2=\"32\" y2=\"48\" fill=\"none\" stroke=\"#202020\" stroke-miterlimit=\"10\" stroke-width=\"2\"/\u003e\n  \u003cline x1=\"48\" y1=\"32\" x2=\"16\" y2=\"32\" fill=\"none\" stroke=\"#202020\" stroke-miterlimit=\"10\" stroke-width=\"2\"/\u003e\n\u003c/svg\u003e`\n\noutlineStroke(strokedSVG).then(outlined =\u003e {\n  console.log(outlined)\n})\n```\n\n`Buffer` input:\n\n```js\nconst fs = require('fs')\nconst outlineStroke = require('svg-outline-stroke')\n\nfs.readFile('./source.svg', (err, data) =\u003e {\n  if (err) throw err\n  outlineStroke(data).then(outlined =\u003e {\n    fs.writeFile('./dest.svg', outlined, err =\u003e {\n      if (err) throw err\n      console.log('yup, outlined!')\n    })\n  })\n})\n```\n\n## Params\n\nThe second argument accepts `params` to apply directly when re-tracing the image, like `fill` color of the `path`, `background` and so on. Take a look into [potrace params](https://github.com/tooolbox/node-potrace#parameters)\n\n```js\noutlineStroke(strokedSVG, { color: '#bada55' }).then(outlined =\u003e {\n  console.log(outlined, 'Outlined SVG with #bada55 `fill` color')\n})\n```\n\n## Related\n\n[micro-outline-stroke](https://github.com/elrumordelaluz/micro-outline-stroke)\nMicroservice with a public [endpoint](https://outline-stroke.vercel.app/)\n\n[outline-stroke-cli](https://github.com/elrumordelaluz/outline-stroke-cli) CLI version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felrumordelaluz%2Foutline-stroke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felrumordelaluz%2Foutline-stroke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felrumordelaluz%2Foutline-stroke/lists"}