mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
17 lines
595 B
JavaScript
17 lines
595 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var filesystem_tools_1 = require("../toolbox/filesystem-tools");
|
|
var string_tools_1 = require("../toolbox/string-tools");
|
|
// try loading this module
|
|
function loadModule(path) {
|
|
if (string_tools_1.strings.isBlank(path)) {
|
|
throw new Error('path is required');
|
|
}
|
|
if (filesystem_tools_1.filesystem.isNotFile(path)) {
|
|
throw new Error(path + " is not a file");
|
|
}
|
|
require.resolve(path);
|
|
return require(path);
|
|
}
|
|
exports.loadModule = loadModule;
|
|
//# sourceMappingURL=module-loader.js.map
|