Added utility method to setup an edge with properties from JS