🌳
pt0/deployF/acornF/getPathBeforeBinBoundaryF.mts
2export const getPathBeforeBinBoundary = (ptPath: string) => {
3 for (const dir of ['binF', 'bin']) {
4 const midIdx = ptPath.indexOf(`/${dir}/`)
5 if (midIdx !== -1) return ptPath.slice(0, midIdx)
6 if (ptPath.endsWith(`/${dir}`)) return ptPath.slice(0, -dir.length - 1)
7 }
8 return ptPath
9}