UNPKG

file-name

Version:

Get the basename of a filepath excluding extension.

15 lines (11 loc) 278 B
/*! * file-name <https://github.com/jonschlinkert/file-name> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var path = require('path'); module.exports = function filename(fp) { return path.basename(fp, path.extname(fp)); };