Starcounter-Jack/Fast-JSON-Patch — pull request #61 by pcalchi (2014-12-30 18:10:33+00:00)
Title: Safety change to json-patch-duplex.js

if oldVal is an object and newVal is a string or any other primitive type a typeError exception is thrown by the Object.Keys function. This is a simple safety check to avoid the exception.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys