$ cnpm install basename
Get the bare name of a file, without its extension.
> npm install basename
var basename = require('basename'); basename('path/to/file.txt'); // » "file"
MIT © Tomek Wiszniewski.
Copyright 2013 - present © cnpmjs.org