import { get } from '../helpers' ; export function disposeSources < Sources > ( sources ) { Object . keys ( sources ) . forEach ( function disposeSource ( sourceName ) { const source = get ( sources , sourceName ) ; return source . dispose && source . dispose ( ) ; } ) ; }