param a param b returns export default function difference < T , X > ( a , b ) { const difference = new Map ( a ) ; for ( const [ keyInB ] of b ) { difference . delete ( keyInB ) ; } return difference ; }