Commit | Line | Data |
---|---|---|
f568f368 | 1 | export const ifUndefined = <T>(value: T | undefined, isValue: T): T => { |
194b6bf3 | 2 | if (value === undefined) return isValue |
66a7748d JB |
3 | return value as T |
4 | } | |
f568f368 | 5 | |
f568f368 | 6 | // export const compose = <T>(...fns: ((arg: T) => T)[]): ((x: T) => T) => { |
66a7748d JB |
7 | // return (x: T) => fns.reduceRight((y, fn) => fn(y), x) |
8 | // } |