MCPcopy Create free account
hub / github.com/clayrisser/create-react-renderer / flattenPath

Function flattenPath

phaseF/src/util.ts:4–10  ·  view source on GitHub ↗
(path?: Path | undefined)

Source from the content-addressed store, hash-verified

2import { Path } from "./types";
3
4export function flattenPath(path?: Path | undefined): string {
5 if (typeof path !== "number" && !path) return "";
6 if (!Array.isArray(path)) return path.toString();
7 return _.flattenDeep(path)
8 .filter((s: number | string) => s.toString().length)
9 .join(".");
10}

Callers 1

getBodyPathMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected