Skip to content

Commit 0398175

Browse files
committed
Update documentation, examples, update readme, add gitter hook
1 parent e1117a7 commit 0398175

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

lib/action.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,29 @@ var makeAction = function makeAction(actionId, parentActionId, actionSchema, act
389389
};
390390
};
391391

392+
// /**
393+
// * Clean entity from entity reducer
394+
// *
395+
// * @memberOf action.makeAction.Action
396+
// * @type {Function}
397+
// *
398+
// * @example
399+
// * store.dispatch(userLoginAction.clean())
400+
// *
401+
// * @returns {Undefined} - returns None, only clear entity data
402+
// */
403+
// this.action.clean = () => {
404+
// return (dispatch, getState) => {
405+
// dispatch({
406+
// time: new Date().getTime(),
407+
// type: ACTION_CLEAN_TYPE_NAME,
408+
// prefix: ACTION_TYPE_PREFIX,
409+
// actionId: this.actionId,
410+
// actionSchema: this.schema
411+
// })
412+
// }
413+
// }
414+
392415
return this.action;
393416
};
394417

lib/config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ var ENTITIES_REDUCER_NAME = exports.ENTITIES_REDUCER_NAME = ACTION_TYPE_PREFIX +
7676
*/
7777
var ACTION_EMPTY_TYPE_NAME = exports.ACTION_EMPTY_TYPE_NAME = ACTION_TYPE_PREFIX + '-empty';
7878

79+
/**
80+
* Action type name for clear entity data from entity reducer
81+
*
82+
* @memberOf config
83+
* @const
84+
* @type {String}
85+
*/
86+
var ACTION_CLEAN_TYPE_NAME = exports.ACTION_CLEAN_TYPE_NAME = ACTION_TYPE_PREFIX + '-clean';
87+
7988
/**
8089
* replaced default response mapper to callback
8190
*
@@ -102,5 +111,5 @@ var setDenormalize = exports.setDenormalize = function setDenormalize(denormaliz
102111
};
103112

104113
if (IS_TEST_ENVIRONMENT) {
105-
setDenormalize.denormalize = require('normalizr').denormalize;
114+
setDenormalize(require('normalizr').denormalize);
106115
}

0 commit comments

Comments
 (0)