knockout/knockout — pull request #1033 by imrefazekas (2013-07-12 22:59:08+00:00)
Title: New toJS mapping handler to generate JS along with a model prototype

Dear Knockout team,

I added a new function to the mapping handler: toJSByPrototype

Using this function, one can generate the JS by a prototype. So walking through recursively the prototype, every matching observables function will be taken into account.

Helps me a lot in my projects where models are coming from the server and the viewmodel is created according to that and when sending back, the JS has to follow and must be restricted to that original model.

I hope you consider it useful enough to merge to.