Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
bokeh / server / static / js / lib / core / util / modules.js
Size: Mime:
function is_ModuleError(error) {
    return error instanceof Error && "code" in error;
}
/** T is of import("some/module/path") type */
export async function load_module(module) {
    try {
        return await module;
    }
    catch (e) {
        // XXX: this exposes the underyling module system and hinders
        // interoperability with other module systems and bundlers
        if (is_ModuleError(e) && e.code === "MODULE_NOT_FOUND")
            return null;
        else
            throw e;
    }
}
//# sourceMappingURL=modules.js.map