Total Complexity | 4 |
Complexity/F | 4 |
Lines of Code | 8 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | module.exports = function (input) { |
||
2 | // TODO: add logging |
||
3 | try { |
||
4 | return !input || input === '' ? {} : JSON.parse(input) |
||
5 | } catch (e) { |
||
6 | return {customData: input} |
||
7 | } |
||
8 | } |
||
9 |