UNPKG

maxleap-react-native

Version:
26 lines (18 loc) 533 B
'use strict'; 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 }; }