import { formatCmd , formatNetwork , formatFile } from './formatters' ; export default function flatFormatter ( events , buffer ) { for ( var i = 0 ; i < events . length ; i ++ ) { const event = events [ i ] ; if ( event . event === 'session.exec' ) { buffer . push ( formatCmd ( event ) ) ; } else if ( event . event === 'session.connect' ) { buffer . push ( formatNetwork ( event ) ) ; } else if ( event . event === 'session.open' ) { buffer . push ( formatFile ( event ) ) ; } } }