src/defaults.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 20
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2
mnd 0
bc 0
fnc 2
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A defaults.js ➔ defaultDataSanitizer 0 3 1
1
import { sanitizePasswords, simpleSanitizer } from './utils/sanitizers';
2
3
function defaultDataSanitizer(data) {
4
    return simpleSanitizer(sanitizePasswords(data));
5
}
6
7
const defaultLevel = 'info';
8
const defaultErrorLevel = 'error';
9
10
const defaultMethodNameFilter = name => name !== 'constructor' && name.indexOf('_') !== 0;
11
12
export default {
13
    level            : defaultLevel,
14
    errorLevel       : defaultErrorLevel,
15
    paramsSanitizer  : defaultDataSanitizer,
16
    resultSanitizer  : defaultDataSanitizer,
17
    errorSanitizer   : simpleSanitizer,
18
    methodNameFilter : defaultMethodNameFilter,
19
    logger           : console
20
};
21
22