Recently, I needed SVG smoothing code. I looked at a demo here by netsi1964 and all credits to the code go to him: I only want to trim the code down for the later use.
Note: it is limited to smoothing PATH elements which uses only the L and M line types. Something you can generate with:
function points_to_z(points) {
z = ""
z += `M ${points[0][0]} ${points[0][1]} `
points.slice(1).forEach(function(point) {