oak-external-sdk/es/MapWorldSDK.js

21 lines
505 B
JavaScript

import MapWorldInstance from "./service/mapWorld/mapWorld";
class MapWorldSDK {
webKeyMap;
constructor() {
this.webKeyMap = {};
}
getInstance(key) {
if (this.webKeyMap[key]) {
return this.webKeyMap[key];
}
const instance = new MapWorldInstance(key);
Object.assign(this.webKeyMap, {
[key]: instance,
});
return instance;
}
}
const SDK = new MapWorldSDK();
export default SDK;
export { MapWorldInstance, };