@hsui/sdk
Version:
Hundsun frontend framework JSSDK
17 lines • 558 B
JavaScript
import { getPlatform } from './utils';
import * as ucfSdk from './ucf';
import * as webSdk from './web';
import * as _idCheckSdk from './id-check';
export { _idCheckSdk as idCheckSdk };
export { LogLevel, createLogger } from './tracker';
export var setConfig = adapter('setConfig');
export var ajax = adapter('ajax');
export var ajaxCancelMap = webSdk.ajaxCancelMap;
export var storage = adapter('storage');
function adapter(api) {
if (getPlatform() === 'ucf') {
return ucfSdk[api];
} else if (getPlatform() === 'web') {
return webSdk[api];
}
}