package.dist.prod.util.getFileExtension.js.map Maven / Gradle / Ivy
{
"version": 3,
"sources": ["../../../src/util/getFileExtension.ts"],
"sourcesContent": ["/**\n * \"\" -> \"\"\n * \"noExtension\" -> \"\"\n * \"file.txt\" -> \".txt\"\n * \"file.with.many.dots.doc\" -> \".doc\"\n * \".gitignore\" -> \"\"\n *\n * @param { string } fileName - the file name\n * @returns { string }\n */\nconst getFileExtension = (fileName: string) => {\n\tconst dotPos = fileName.lastIndexOf(\".\");\n\n\tif (dotPos < 1) {\n\t\treturn \"\";\n\t}\n\n\treturn fileName.slice(dotPos);\n};\n\nexport default getFileExtension;\n"],
"mappings": "aAUA,MAAMA,EAAoBC,GAAqB,CAC9C,MAAMC,EAASD,EAAS,YAAY,GAAG,EAEvC,OAAIC,EAAS,EACL,GAGDD,EAAS,MAAMC,CAAM,CAC7B,EAEA,eAAeF",
"names": ["getFileExtension", "fileName", "dotPos"]
}