(value: unknown)
| 5 | Array.from(new Set(collection)).filter((value): value is T => Boolean(value)); |
| 6 | |
| 7 | export const arrayify = (value: unknown): string[] => |
| 8 | Array.isArray(value) |
| 9 | ? value.filter((item): item is string => typeof item === 'string') |
| 10 | : typeof value === 'string' |
| 11 | ? [value] |
| 12 | : []; |
| 13 | |
| 14 | export const partition = <T>(collection: Collection<T>, predicate: (item: T) => unknown) => { |
| 15 | const results: [T[], T[]] = [[], []]; |
no outgoing calls
no test coverage detected