Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 13 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 0 |
1 | 1 | /** |
|
2 | 1 | * test if val is a function |
|
3 | 1 | */ |
|
4 | 1 | const isFunction = (val: unknown): val is Function => typeof val === 'function'; |
|
5 | 1 | ||
6 | 1 | /** |
|
7 | 1 | * prevent output undefined |
|
8 | 1 | */ |
|
9 | 1 | // eslint-disable-next-line @typescript-eslint/no-base-to-string, @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing |
|
10 | 2 | const safeString = (st?: Object): string => (st || '').toString(); |
|
11 | 1 | ||
12 | export { isFunction, safeString }; |
||
13 |