schlechtenburg/packages/docs/lib/package.ts

5 lines
129 B
TypeScript
Raw Normal View History

2022-03-15 23:03:45 +00:00
export const getShortPackageName = (name: string) => {
const parts = name.split('/');
return parts[1] || parts[0] || name;
}