| Total Complexity | 1 |
| Complexity/F | 0 |
| Lines of Code | 14 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Coverage | 80% |
| Changes | 0 | ||
| 1 | 1 | import {identity} from 'fp-ts/lib/function'; |
|
| 2 | 1 | import * as t from 'io-ts'; |
|
| 3 | |||
| 4 | 84 | const is = <A>() => (u: unknown): u is Array<A> => u instanceof Array; |
|
| 5 | |||
| 6 | 84 | export const ArrayC = <A = never>() => new t.Type<Array<A>>( |
|
| 7 | 'Array', |
||
| 8 | is<A>(), |
||
| 9 | (u, c) => is<A>()(u) |
||
| 10 | ? t.success(u) |
||
| 11 | : t.failure(u, c), |
||
| 12 | identity |
||
| 13 | ); |
||
| 14 |