@am92/securities-utility
Version:
A utility package for securities applications
17 lines (16 loc) • 637 B
JavaScript
import DownloadManager from './DownloadManager';
/**
* Default configuration values for the module
*/
const DEFAULT_VALUES = { requireSearchModule: false };
/**
* Initializes the download process by creating an instance of DownloadManager.
*
* @param {string} secMasterURL - The URL of the sec master file to be downloaded.
* @param {IConfig} [config=DEFAULT_VALUES] - Optional configuration for the download manager.
* Defaults to `{ requireSearchModule: false }` if not provided.
* @returns {void}
*/
export function initializeDownload(secMasterURL, config = DEFAULT_VALUES) {
new DownloadManager(secMasterURL, config);
}