Adding deprecation value to replace function

@cpennington @flowerhack @dianakhuang 
The replace function wasn't transmitting the deprecation property to the new object. This should fix that.

I'm 100% sure where I should put the unit test for this. Suggestions?
I am following what the test function above it does.