forked from lix-project/lix-website
12 lines
218 B
JavaScript
12 lines
218 B
JavaScript
|
const path = require('path');
|
||
|
|
||
|
const EXTRE = /^[.]?[^.]+([.].*)$/;
|
||
|
|
||
|
module.exports = function (input) {
|
||
|
var extension = EXTRE.exec(path.basename(input));
|
||
|
if (!extension) {
|
||
|
return;
|
||
|
}
|
||
|
return extension[1];
|
||
|
};
|