Files
NativeScript/packages/core/utils/utils-shared.ts
2025-07-11 16:18:14 -07:00

8 lines
182 B
TypeScript

export function getFileExtension(path: string): string {
if (!path) {
return '';
}
const index = path.lastIndexOf('.');
return index !== -1 ? path.substring(index + 1) : '';
}