Does anybody know a js library/algorithm for optimizing SVG path? I need to optimize paths only (reduce number of nodes). My path is autogenerated and is full of beziers, so simplify.js mentioned in a similar question won't fit. I'm also required to use browser, so node-backed modules won't fit too.
The most perfect optimization is done by Inkscape, but I don't want to port 1000+ lines of path optimization code from C++ to JS.
I'm looking for something like this: http://paperjs.org/examples/path-simplification/
Finally used paperjs. Unfortunately they don't support modular builds yet