import { EqualFunction } from '../types/types' ; export const mapsEqual = < Key , Value > ( from , to , equalFunction = ( from , to ) => from === to ) : boolean => { for ( const [ key , value ] of to ) { if ( ! ( from . has ( key ) && equalFunction ( from . get ( key ) ! , value ) ) ) { return false ; } } for ( const key of from . keys ( ) ) { if ( ! to . has ( key ) ) { return false ; } } return true ; } ;