GoScrobble/web/node_modules/rollup-pluginutils/src/addExtension.ts

10 lines
261 B
TypeScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
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 };