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

Function tokenizePathString

test/testMethods.ts:351–362  ·  view source on GitHub ↗
(pathString: string)

Source from the content-addressed store, hash-verified

349}
350
351function tokenizePathString(pathString: string) {
352 const numbers: string[] = [];
353 pathString.split("Z").forEach((path) =>
354 path.split(/[A-Z]/).forEach((token) =>
355 token.split(",").forEach((numberString) =>
356 numberString.split(" ").forEach((num) => {
357 if (num !== "") {
358 numbers.push(num);
359 }
360 }))));
361 return numbers;
362}
363
364export type RGB = {
365 red: number,

Callers 1

assertAreaPathCloseToFunction · 0.85

Calls 2

forEachMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected