MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / extractFileExtension

Function extractFileExtension

src/lib/file.js:58–65  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

56}
57
58export function extractFileExtension(fileName) {
59 const lastindexDot = fileName.lastIndexOf('.');
60 if (lastindexDot <= 0) { // no extension
61 return '';
62 } else {
63 return fileName.substring(lastindexDot + 1, fileName.length).toLowerCase().trim();
64 }
65}
66
67export class FileUpload {
68 constructor() {

Callers 3

FilePanel.jsFile · 0.90
onSetDataMethod · 0.90
encryptFilesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected