export function pick < T , K extends keyof T > ( obj , ... keys ) { const ret = { } ; keys . forEach ( key => { ret [ key ] = obj [ key ] ; } ) ; return ret ; } export function isReverseSorted ( arr ) { const len = arr . length - 1 ; for ( let i = 0 ; i < len ; ++ i ) { if ( arr [ i ] < arr [ i + 1 ] ) { return false ; } } return true ; }