To transform the path array you would do something along those lines:
const arr = path.array()
arr.map(segment => {
// ... add code to get the x and y of all the points used
// for a line it would be segment[1] and segment[2]
const {x, y} = new SVG.Point(segment[1], segment[2]).transform(transform)
return [segment[0], x, y]
})
To transform the path array you would do something along those lines: