docs: function createLoader(handlers) {
    var handlerMap = new Map(Object.keys(handlers).map(function (key) {
      return [key, handlers[key]];
    }));
    handlers = undefined;
  
    return function (state, data) {
      var keys = Object.keys(data);
      return Promise.all(keys.map(function (key) {
        var handler = handlerMap.get(key);
  
        return handler(state, data[key]);
      })).then(function (results) {
        var data = Object.create(null);
        results.forEach(function (result, index) {
          data[keys[index]] = result;
        });
        return data;
      });
    };
  }