Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const pathMetaParser = _.memoize((path: string) => {
const segments = pathUtil.parsePathString(path);
const nums = _.flatten(segments).filter((num) => _.isNumber(num));
return {
range: Math.max.apply(null, nums) - Math.min.apply(null, nums),
segments,
};
});
parsePath(path: string, isLineToArc: boolean = true): PathCommand[] {
const coordinate = this.coordinate;
let parsedPath = parsePathString(path);
if (coordinate.isPolar && isLineToArc !== false) {
parsedPath = convertPolarPath(coordinate, parsedPath);
} else {
parsedPath = convertNormalPath(coordinate, parsedPath);
}
return parsedPath;
},
/**