src/internals/reactools/fetch/fetchSaga.js
/**
 * Create a fetch saga based on fetch action type and corresponding saga effect
 *    fetch - handle all such fetch calls
 *    fetchLatest - terminate all incomplete previous fetches upon a new one
 *    fetchLeading - ignore all future requests until the current fetch request has finished
 *
 * @param {object} metadata - fetch metadata file
 * @param {object} options - options to modify fetch behavior
 * @param {string} fetchActionType - accepting fetch action type
 * @param {function} sagaEffect - effect to call from redux-saga
 * @return {Function} - saga
 */
Create a fetch saga based on fetch action type and corresponding saga effect
fetch - handle all such fetch calls
fetchLatest - terminate all incomplete previous fetches upon a new one
fetchLeading - ignore all future requests until the current fetch request has finished


Create a fetch saga based on fetch action type and corresponding saga effect fetch - handle all such fetch calls fetchLatest - terminate all incomplete previous fetches upon a new one fetchLeading - ignore all future requests until the current fetch request has finished
function createSaga(metadata, options, fetchActionType, sagaEffect) {
  if (!metadata) {
    throw new Error('Fetch metadata cannot be empty!');
  }
  setupFetch(options);
  return function*() {
    yield sagaEffect(fetchActionType, fetchActionHandler, metadata);
  };
}
function createSaga ( metadata , options , fetchActionType , sagaEffect ) { if ( ! metadata ) { throw new Error ( 'Fetch metadata cannot be empty!' ) ; } setupFetch ( options ) ; return function * ( ) { yield sagaEffect ( fetchActionType , fetchActionHandler , metadata ) ; } ; }
Create a fetch saga based on fetch action type and corresponding saga effect
    fetch - handle all such fetch calls
    fetchLatest - terminate all incomplete previous fetches upon a new one
    fetchLeading - ignore all future requests until the current fetch request has finished
Create a fetch saga based on fetch action type and corresponding saga effect fetch - handle all such fetch calls fetchLatest - terminate all incomplete previous fetches upon a new one fetchLeading - ignore all future requests until the current fetch request has finished
// setup custom fetch behavior as required