docs: function createModule(moduleName) {
      var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var initialState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
      var namespaceActions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  
  
      if ((typeof moduleName === 'undefined' ? 'undefined' : _typeof(moduleName)) == 'object') {
          console.warn('createModule was called with what appears to be' + ' the deprecated 1.x signature (schema [, initalState , namespace]).' + ' Please update usage to the new format (moduleName, schema [, initialState, namespaceActions])' + ' before the next major release of create-redux-module.' + ' Attempting to convert to new format.');
          var map = {
              schema: moduleName,
              initialState: schema,
              namespaceActions: typeof initialState == 'string',
              moduleName: typeof initialState == 'string' ? initialState : 'unknown_module'
          };
          moduleName = map.moduleName;
          schema = map.schema;
          initialState = map.initialState;
          namespaceActions = map.namespaceActions;
      }
  
      var actions = {};
      var handlers = {};
  
      function createActionHandler(actionName) {
          var baseType = actionCase(actionName);
  
          if (typeof namespaceActions == 'string') {
              namespaceActions = [namespaceActions];
          }
  
          var actionType = namespaceActions === true || Array.isArray(namespaceActions) && namespaceActions.indexOf(actionName) > -1 ? moduleName + '/' + baseType : baseType;
  
          var actionCreator = createActionCreator(actionType);
          var handler = function handler(state, action) {
              return state;
          };
  
          var def = schema[actionName];
          if (def === null) {
              // default as above
          } else if (typeof def == 'function') {
              handler = def;
          } else if (Array.isArray(def)) {
              actionCreator = def[0] || actionCreator;
              handler = def[1] || handler;
          } else if ((typeof def === 'undefined' ? 'undefined' : _typeof(def)) == 'object' && def.promise) {
              schema[actionName] = createSchemaPromiseEntry(def, actionName, actions);
              createActionHandler(actionName);
  
              var requestActionName = actionName + 'Pending';
              schema[requestActionName] = createSchemaPendingEntry();
              createActionHandler(requestActionName);
  
              var successActionName = actionName + 'Success';
              schema[successActionName] = createSchemaSuccessEntry(def, successActionName);
              createActionHandler(successActionName);
  
              var failureActionName = actionName + 'Failure';
              schema[failureActionName] = createSchemaFailureEntry(def, failureActionName);
              createActionHandler(failureActionName);
  
              return;
          } else {
              throw new Error('Incorrect schema format, [' + actionName + '] must be a handlerFn, array, API object, Promise object, or null');
          }
  
          actions[actionName] = actionCreator.bind({
              moduleName: moduleName,
              baseType: baseType,
              type: actionType,
              actionName: actionName,
              actions: actions // reference other actions from this action
          });
  
          actions[actionName].toString = function () {
              return actionType.toString();
          };
  
          handlers[actionType] = handler;
      }
  
      Object.keys(schema).forEach(createActionHandler);
  
      var reducer = function reducer() {
          var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
          var action = arguments[1];
  
          var handler = handlers[action.type];
          return handler ? handler(state, action) : state;
      };
  
      // sas = [initialState, action, newState]
      var test = function test() {
          for (var _len3 = arguments.length, sas = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
              sas[_key3] = arguments[_key3];
          }
  
          sas.forEach(function (_ref) {
              var _ref2 = _slicedToArray(_ref, 3),
                  initialState = _ref2[0],
                  action = _ref2[1],
                  newState = _ref2[2];
  
              _assert2.default.deepEqual(reducer(initialState, action), newState, moduleName + '.reducer' + ('(' + JSON.stringify(initialState)) + (', ' + JSON.stringify(action) + ') !== ') + ('' + JSON.stringify(newState)));
          });
      };
  
      var module = {
          actions: actions,
          reducer: reducer,
          mapDispatch: mapDispatch.bind(null, actions),
          test: test
      };
      module.toString = function () {
          return moduleName.toString();
      };
  
      return module;
  }