This commit is contained in:
2021-11-21 11:18:28 +01:00
parent 7a358eb836
commit 230b10b2a3
9339 changed files with 892519 additions and 62 deletions

26
node_modules/import-lazy/index.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
'use strict';
const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod;
module.exports = fn => {
return id => {
let mod;
const handler = {
get: (target, property) => {
mod = lazy(mod, fn, id);
return Reflect.get(mod, property);
},
apply: (target, thisArg, argumentsList) => {
mod = lazy(mod, fn, id);
return Reflect.apply(mod, thisArg, argumentsList);
},
construct: (target, argumentsList) => {
mod = lazy(mod, fn, id);
return Reflect.construct(mod, argumentsList);
}
};
// eslint-disable-next-line prefer-arrow-callback
return new Proxy(function () {}, handler);
};
};