import { BindState } from "./types" ; function evaluate ( expression , value = { } ) { try { return Function . apply ( null , Object . keys ( value ) . concat ( `return ${ expression }` ) ) ( ... Object . values ( value ) ) ; } catch ( err ) { console . error ( "Failed to evaluate" , expression , value , err ) ; } } export default evaluate ;