mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
10 lines
261 B
TypeScript
10 lines
261 B
TypeScript
|
import { extname } from 'path';
|
||
|
import { AddExtension } from './pluginutils';
|
||
|
|
||
|
const addExtension: AddExtension = function addExtension(filename, ext = '.js') {
|
||
|
if (!extname(filename)) filename += ext;
|
||
|
return filename;
|
||
|
};
|
||
|
|
||
|
export { addExtension as default };
|