parentOf

tcmts.share.parentOf · #dim6dbgw · term · runs anywhere

The namespace a dotted name is in, and its last part.

export const parentOf = (p: string) => p.slice(0, Math.max(0, p.lastIndexOf(".")))

used by