Package Exports
- shapepath
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shapepath) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shapepath
No-dependecy, fast and lightweight SVG Shape Parser and Compiler
CDN
# unpkg
https://unpkg.com/shapepath
# npmcdn
https://npmcdn.com/shapepath
# jsDelivr
https://cdn.jsdelivr.net/npm/shapepath
Installing
$ npm install shapepath
# or
$ yarn add shapepath
Usage
var ShapePath = require('shapepath');
var toPoints = ShapePath.toPoints;
var toPath = ShapePath.toPath;
var RectSVG = toPoints({type:'rect',x:0,y:0,width:200,height:200});
var getAsPathD = toPath(RectSVG);
Methods
toPoints
Parse path string or rect, etc, inputs object parametrs to Array of Points
toPath
Converts Array of Points to Path string