implement eureka binary in js