added getFileExtension util function
This commit is contained in:
parent
d5167132b0
commit
2d78aa93fc
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
import {errorCodes} from './errorUtil';
|
||||
import { errorCodes } from './errorUtil';
|
||||
|
||||
export function checkConnectivity() {
|
||||
if (navigator.onLine) {
|
||||
|
@ -7,3 +7,7 @@ export function checkConnectivity() {
|
|||
throw new Error(errorCodes.ERR_NO_INTERNET_CONNECTION);
|
||||
}
|
||||
}
|
||||
|
||||
export function getFileExtension(fileName): string {
|
||||
return fileName.substr(fileName.lastIndexOf('.') + 1).toLowerCase();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue