mirror of
https://github.com/Azure/setup-helm.git
synced 2026-07-07 08:51:37 +00:00
a517f2ff65
Co-authored-by: taakleton <taakleton@users.noreply.github.com>
13 lines
264 B
JavaScript
13 lines
264 B
JavaScript
'use strict';
|
|
|
|
const {pathToFileURL} = require('url');
|
|
|
|
module.exports = async filename => {
|
|
const mod = await import(pathToFileURL(filename));
|
|
if ('default' in mod === false) {
|
|
throw new Error(`${filename} has no default export`);
|
|
}
|
|
|
|
return mod.default;
|
|
};
|