nope/lib/loader/getPackageLoader.nodejs.ts

25 lines
641 B
TypeScript
Raw Normal View History

2022-01-17 17:06:10 +00:00
/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
* @desc [description]
*/
import { INopeDispatcherOptions } from "../types/nope/nopeDispatcher.interface";
import { getPackageLoader as getBrowserPackageLoader } from "./getPackageLoader.browser";
import { NopePackageLoaderFileAccess } from "./nopePackageLoader.nodejs";
/**
* Function to extract a Singleton Dispatcher
* @param options The provided options for the Dispatcher
*/
export function getPackageLoader(
options: INopeDispatcherOptions,
singleton = true
) {
return getBrowserPackageLoader(
options,
singleton,
NopePackageLoaderFileAccess
);
}