mirror of
https://github.com/JonasunderscoreJones/api-worker.git
synced 2025-10-23 18:39:19 +02:00
9 lines
261 B
TypeScript
9 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 };
|