Skip to content

Commit

Permalink
Simplify example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 21, 2021
1 parent 15adccf commit 7cf533e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,9 @@ per segment, which contain next properties:
const svgpath = require("svgpath");
const parsePath = require("svg-path-segments");

const segmentsSVGPath = (iconPath) => {
const segments = parsePath(iconPath);
const SVGPath = svgpath("");
SVGPath.segments = segments.map(segment => segment.params);
return {segments, SVGPath};
}

const {segments, SVGPath} = segmentsSVGPath("M5 6 7 8l3 4z");
const segments = parsePath(iconPath);
const SVGPath = svgpath("");
SVGPath.segments = segments.map(segment => segment.params);
```

[npm-link]: https://www.npmjs.com/package/svg-path-segments
Expand Down

0 comments on commit 7cf533e

Please # to comment.