import { FlowTransducer , GenObject } from './types' ; export const toArray = ( object ) : any [ ] => Object . values ( object ) ; export const toObject = < T extends TObject > ( keyInElem ) => ( acc , elem ) : GenObject < T > => ( { ... acc , [ elem [ keyInElem ] as any ] : elem } ) ; export const add = ( key ) => ( fn ) => ( data ) => ( store ) => { return { ... store , [ key ] : fn ( data , store ) } ; } ;