dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/rechoir/lib/extension.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

11 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];
};