reversePath()
Part of the @remotion/paths package.
Reverses a path so the end and start are switched.
import { reversePath } from "@remotion/paths";
const reversedPath = reversePath ("M 0 0 L 100 0");
console .log (reversedPath ); // "L 100 0 M 0 0"The function will throw if the path is invalid:
reversePath ("remotion"); // Error: Malformed path data: ...Credits
Source code stems mostly from svg-path-reverse.