Equivalent of $ wrap() in D3