fgo-ta-com-website/src/utils/slugTools.ts

3 lines
106 B
TypeScript
Raw Normal View History

export function findSlug(filepath: string) {
return filepath.match(/(?:.*[\\/])(.+)(?:\.json)/)?.[1]
}