4
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2025-11-09 14:06:56 +00:00
setup-helm/node_modules/@istanbuljs/load-nyc-config/load-esm.js
2022-06-27 14:17:15 -04:00

12 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;
};