All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.util.getFileExtension.js.map Maven / Gradle / Ivy

{"version":3,"file":"getFileExtension.js","sourceRoot":"","sources":["../../src/util/getFileExtension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAEzC,IAAI,MAAM,GAAG,CAAC,EAAE;QACf,OAAO,EAAE,CAAC;KACV;IAED,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","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"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy