1.0.1 • Published 4 years ago

curvify-svg-path v1.0.1

Weekly downloads
63
License
MIT
Repository
github
Last release
4 years ago

curvify-svg-path

a rewrite of normalize-svg-path that does away with svg-arc-to-cubic-bezier

Build status

install

$ npm install michaelrhodes/curvify-svg-path#1.0.0

use

var abs = require('abs-svg-path')
var parse = require('parse-svg-path')
var curvify = require('curvify-svg-path')

curvify(abs(parse('M0 0 L10 10 A10 10 0 0 0 20 20 Z')))
=> [['M',0,0],['C',0,0,10,10,10,10],['C',10,15.5,14.5,20,20,20],['C',20,20,0,0,0,0]]
curvify x 1,405,052 ops/sec ±0.98% (86 runs sampled)
normalize x 1,261,684 ops/sec ±0.97% (87 runs sampled)

obey

MIT