import { Bits } from '../types' ; example param { Array } bits param { Number } spacing param { Number } spacer return { String } export default ( bits , spacing = 0 , spacer = ' ' ) : string => { if ( ! spacing ) return bits . join ( '' ) ; let result = '' ; for ( let i = 0 ; i < bits . length ; i ++ ) { result += `${ bits [ i ] }` ; if ( i % spacing === spacing - 1 && i !== bits . length - 1 ) result += spacer ; } return result ; } ;