MCPcopy
hub / github.com/palantir/plottable / decomposePath

Function decomposePath

test/testMethods.ts:166–175  ·  view source on GitHub ↗
(normalizedPathString: string)

Source from the content-addressed store, hash-verified

164 * }[]
165 */
166export function decomposePath(normalizedPathString: string) {
167 const commands = normalizedPathString.split(/[^A-Z]/).filter((s) => s !== "");
168 const argumentStrings = normalizedPathString.split(/[A-Z]/).slice(1);
169 return commands.map((command, index) => {
170 return {
171 command: command,
172 arguments: argumentStrings[index].split(",").filter((s) => s !== "").map((s) => parseFloat(s)),
173 };
174 });
175}
176
177export function numAttr(s: SimpleSelection<void>, a: string) {
178 return parseFloat(s.attr(a));

Callers

nothing calls this directly

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected