7f070e49a8aa7fde7f8e268f6369172494c8e13c
1 export const ifUndefined
= <T
>(value
: T
| undefined, isValue
: T
): T
=> {
2 if (value
=== undefined) return isValue
6 // const isIterable = <T>(obj: T): boolean => {
10 // return typeof (obj as unknown as Iterable<T>)[Symbol.iterator] === 'function'
13 // const ifNotIterableDo = <T>(obj: T, cb: () => void): void => {
14 // if (isIterable(obj) === false) cb()
17 // export const compose = <T>(...fns: ((arg: T) => T)[]): ((x: T) => T) => {
18 // return (x: T) => fns.reduceRight((y, fn) => fn(y), x)