3 lines
106 B
TypeScript
3 lines
106 B
TypeScript
|
export function findSlug(filepath: string) {
|
||
|
return filepath.match(/(?:.*[\\/])(.+)(?:\.json)/)?.[1]
|
||
|
}
|