Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getPoints(d) {
const points = []
parsePathString(d).forEach((segment) => {
const point = points.length > 0 && points[points.length - 1]
switch (segment[0].toLowerCase()) {
case "m":
return points.push(M(segment, point))
case "l":
return points.push(L(segment, point))
case "h":
return points.push(H(segment, point))
case "v":
return points.push(V(segment, point))
case "q":