Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 17 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | 'use strict'; |
||
2 | |||
3 | function isEmpty(x) { |
||
4 | return ( |
||
5 | typeof x === 'undefined' || |
||
6 | x === null || |
||
7 | x === 'null' || |
||
8 | x === 'undefined' || |
||
9 | x === false || |
||
10 | x.length === 0 || |
||
11 | x === '' |
||
12 | ); |
||
13 | } |
||
14 | |||
15 | module.exports = { |
||
16 | isEmpty: isEmpty, |
||
17 | }; |
||
18 |