dead-simple optimistic async helper in javascript