[javascript] is there a function in lodash to replace matched item