Skip to content

Commit a32491f

Browse files
committed
Have option checkers return boolean
1 parent 0e9cbee commit a32491f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ import defaults from './defaults';
2222
* @returns {function} logger middleware
2323
*/
2424
function directlyApplied(options) {
25-
return options.getState && options.dispatch;
25+
return !!(options.getState && options.dispatch);
2626
}
2727

2828
function noLogger(options) {
29-
return typeof options.logger === 'undefined';
29+
return !options.logger;
3030
}
3131

3232
function shouldNotLog({ predicate }, getState, action) {
33-
return typeof predicate === 'function' && !predicate(getState, action);
33+
return !!(typeof predicate === 'function' && !predicate(getState, action));
3434
}
3535

3636
function shouldDiff({ diff, diffPredicate }, getState, action) {
37-
return diff && typeof diffPredicate === 'function' && diffPredicate(getState, action);
37+
return !!(diff && typeof diffPredicate === 'function' && diffPredicate(getState, action));
3838
}
3939

4040
function emptyLogger() {

0 commit comments

Comments
 (0)