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?
sure thing