export function isDefined < T > ( value ) { return < T > value !== undefined && < T > value !== null ; } function isIterable ( target ) { return ! ! target && typeof target [ Symbol . iterator ] === "function" ; } param value returns export function arrayify < T > ( value ) { if ( value === undefined ) { return [ ] ; } switch ( typeof value ) { case "string" : return [ value ] ; case "object" : if ( isIterable ( value ) ) { return [ ... value ] ; } break ; } return [ value ] ; }