mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
13 lines
358 B
TypeScript
13 lines
358 B
TypeScript
// Shared helpers and types for utils, used by both native-helper and common.
|
|
// Only put platform-agnostic logic here.
|
|
|
|
export function getFileExtension(path: string): string {
|
|
if (!path) {
|
|
return '';
|
|
}
|
|
const index = path.lastIndexOf('.');
|
|
return index !== -1 ? path.substring(index + 1) : '';
|
|
}
|
|
|
|
// Add more shared helpers/types/constants as needed.
|