src/helpers/index.js   A
last analyzed

Complexity

Total Complexity 5
Complexity/F 1.25

Size

Lines of Code 19
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
eloc 12
c 1
b 0
f 0
nc 2
dl 0
loc 19
rs 10
wmc 5
mnd 0
bc 2
fnc 4
bpm 0.5
cpm 1.25
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.js ➔ ??? 0 1 1
1
'use strict'
2
3
import { genToken } from './tokenizer'
4
import { addDays, isAfter } from 'date-fns'
5
6
export class Utils {}
7
8
Utils.isFunction = (val) => typeof val === 'function'
9
Utils.isObject = (val) => typeof val === 'object'
10
Utils.genToken = genToken
11
12
Utils.addDays = (offset, date) => {
13
  date = date || new Date()
14
  return addDays(date, offset)
15
}
16
17
Utils.isAfter = (first, second) => {
18
  return isAfter(second, first)
19
}
20