MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getFileExtension

Function getFileExtension

packages/core/utils/utils-shared.ts:1–7  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

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

Callers 3

getFileExtensionMethod · 0.90
getFileExtensionMethod · 0.90

Calls 1

lastIndexOfMethod · 0.80

Tested by

no test coverage detected