Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
export
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
getMimeTypeNameFromExtension
Function · 0.90
getFileExtension
Method · 0.90
getFileExtension
Method · 0.90
Calls
1
lastIndexOf
Method · 0.80
Tested by
no test coverage detected