1.0.2 • Published 8 years ago
get-ext
Get extension from a path/filename string. Because path
is too massive, and other extname-like libs are too big or wrong.
const extname = require('get-ext');
let ext = extname('./my/path/to.my/file.svg');
//ext === '.svg'