export function compact ( value ) { return value !== null && value !== undefined ; } export function unique ( value , index , self ) { return self . indexOf ( value ) === index ; } export function joinToMap < K , T > ( keys , values ) { const map = new Map < K , T > ( ) ; keys . forEach ( ( key , n ) => { if ( values [ n ] ) { map . set ( key , values [ n ] as T ) ; } } ) ; return map ; }