MCPcopy Create free account
hub / github.com/editablejs/editable / removeFromLast

Function removeFromLast

apps/docs/src/utils/remove-from-last.ts:6–9  ·  view source on GitHub ↗
(path: string, key: string)

Source from the content-addressed store, hash-verified

4 * @param key Another string cursor
5 */
6export function removeFromLast(path: string, key: string) {
7 const i = path.lastIndexOf(key)
8 return i === -1 ? path : path.substring(0, i)
9}

Callers 2

docs-footer.tsxFile · 0.90
SidebarRouteTreeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…