function stripExtension(filename) { return filename.substring(0, filename.lastIndexOf(".")) || filename; } function dirname(path) { return path ? path.match(/.*\//) : path; } function basename(path) { return path ? path.replace(/.*\//, "") : path; } export { stripExtension, dirname, basename };