Better comments

This commit is contained in:
Chi Vinh Le
2017-04-03 12:11:30 +07:00
parent e0a3e8a3c1
commit e0540a5031
+3 -3
View File
@@ -18,7 +18,7 @@ const getPluginName = (key) => key.match(/\.\/(.*)\/client\/.*$/)[1];
const isActivePlugin = (plugin) => clientPlugins.indexOf(plugin) > -1;
/**
* createLoader returns a callback that loads enabled modules of the context and
* Returns a callback that loads enabled modules of the context and
* returns an Array with {plugin, module} entries. Consecutive calls
* will return a memoized result.
*/
@@ -39,14 +39,14 @@ function createLoader(context) {
const loaders = mapValues(contextMap, createLoader);
/**
* getConfig returns the config object of given plugin.
* Returns the config object of given plugin.
*/
function getConfig(plugin) {
return loaders.configs().filter(o => o.plugin === plugin)[0].module;
}
/**
* getSlotElements returns React Elements for given slot.
* Returns React Elements for given slot.
*/
export function getSlotElements(slot, props = {}) {
return loaders.components()