https://github.com/pbeshai/d3-interpolate-path
d3-interpolate-path is a D3 plugin that adds an interpolator optimized for SVG <path> elements. See the GitHub page for details on usage.
A previous version of the library is currently better at extending lines. See how the older v1.1.1 performs.