push
35 of 51 branches covered (68.63%)
Branch coverage included in aggregate %.
301 of 327 relevant lines covered (92.05%)
1.55 hits per line
1 |
export function ensureArray(value) { |
|
2 |
if (!value) {
|
|
3 |
return []
|
× |
4 |
} |
× |
5 |
|
1✔ |
6 |
if (Array.isArray(value)) {
|
1✔ |
7 |
return value
|
1✔ |
8 |
} |
1✔ |
9 |
|
|
10 |
return [value]
|
× |
11 |
} |
× |