The tool can be used to transform a GeoJSON file with Polygons and MultiPolygons into a GeoJSON file with LineStrings, which makes it easier to replace geometries in the JOSM editor.
The script splits boundary lines at their intersections.
E.g. 3 borders areas (polygons), each one has a line which may duplicate edges of another like for green & red and red & blue: