Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 9 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 0 |
1 | import { isNil } from 'ramda'; |
||
2 | |||
3 | 20 | export const shortUrlMatches = (shortUrl, shortCode, domain) => { |
|
4 | 14 | if (isNil(domain)) { |
|
5 | 11 | return shortUrl.shortCode === shortCode && !shortUrl.domain; |
|
6 | } |
||
7 | |||
8 | 3 | return shortUrl.shortCode === shortCode && shortUrl.domain === domain; |
|
9 | }; |
||
10 |