Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

load-esm.js 264B

123456789101112
  1. 'use strict';
  2. const {pathToFileURL} = require('url');
  3. module.exports = async filename => {
  4. const mod = await import(pathToFileURL(filename));
  5. if ('default' in mod === false) {
  6. throw new Error(`${filename} has no default export`);
  7. }
  8. return mod.default;
  9. };