react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
14 lines (13 loc) • 505 B
JavaScript
;
import { processSVGPath } from './path';
function extractPolyPoints(points) {
const polyPoints = Array.isArray(points) ? points.join(',') : points;
return polyPoints.replace(/([^eE])-/g, '$1 -').split(/(?:\s+|\s*,\s*)/g).join(' ');
}
export const processPolylinePoints = points => ({
d: processSVGPath(`M${extractPolyPoints(points)}`)
});
export const processPolygonPoints = points => ({
d: processSVGPath(`M${extractPolyPoints(points)}z`)
});
//# sourceMappingURL=polypoints.js.map