decurve

0.0.1 • Public • Published

shapepath

No-dependecy, fast and lightweight SVG Shape Parser and Compiler

size gzipsize CDNJS jsdelivr unpkg npmcdn NPM Version NPM Downloads
NPM

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

Package Sidebar

Install

npm i decurve

Weekly Downloads

3

Version

0.0.1

License

MIT

Last publish

Collaborators

  • dalisoft