schlechtenburg/packages/docs/lib/api/package.ts

5 lines
129 B
TypeScript

export const getShortPackageName = (name: string) => {
const parts = name.split('/');
return parts[1] || parts[0] || name;
}