mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
refactor: circular deps part 9
This commit is contained in:
@ -101,20 +101,6 @@ export function isDataURI(uri: string): boolean {
|
||||
return firstSegment && firstSegment.indexOf('data:') === 0 && firstSegment.indexOf('base64') >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file extension from file path
|
||||
* @param path file path
|
||||
* @returns file extension
|
||||
*/
|
||||
export function getFileExtension(path: string): string {
|
||||
const dotIndex = path.lastIndexOf('.');
|
||||
if (dotIndex && dotIndex >= 0 && dotIndex < path.length) {
|
||||
return path.substring(dotIndex);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
export function mergeSort(arr, compareFunc) {
|
||||
if (arr.length < 2) {
|
||||
return arr;
|
||||
@ -292,3 +278,5 @@ export function getDurationWithDampingFromSpring(springSettings?: { tension?: nu
|
||||
damping,
|
||||
};
|
||||
}
|
||||
|
||||
export { getFileExtension } from './utils-shared';
|
||||
|
Reference in New Issue
Block a user