maxleap-react-native
Version:
MaxLeap SDK for ReactNative
26 lines (18 loc) • 533 B
JavaScript
;
import ReactNative, { NativeModules } from 'react-native';
const MLConfig = NativeModules.MLConfig;
const configValueChangedEvent = 'com.maxleap.config.valueChange.notification';
var _ = require('underscore');
module.exports = function(ML){
async function currentConfig() {
return await MLConfig.getCurrentConfig();
}
async function fetchConfig(keys) {
return await MLConfig.fetchConfig(keys);
}
ML.Config = ML.Config || {
currentConfig,
fetchConfig,
configValueChangedEvent
};
}