barikoiapis
Version:
Bangladeshi location data provider API library from barikoi.com
20 lines (15 loc) • 429 B
text/typescript
interface LocationServiceConfig {
apiKey: string;
version: string;
}
const defaultConfig: LocationServiceConfig = {
apiKey: "",
version: "v1",
};
let currentConfig: LocationServiceConfig = { ...defaultConfig };
export function setConfig(config: Partial<LocationServiceConfig>): void {
currentConfig = { ...currentConfig, ...config };
}
export function getConfig(): LocationServiceConfig {
return currentConfig;
}