lib/ProofSet.js
function _addToJSON(error) {
  Object.defineProperty(error, 'toJSON', {
    value: function() {
      return serializeError(this);
    },
    configurable: true,
    writable: true
  });
}
function _addToJSON(error) {
  Object.defineProperty(error, 'toJSON', {
    value: function() {
      return serializeError(this);
    },
    configurable: true,
    writable: true
  });
}
function _addToJSON ( error ) { Object . defineProperty ( error , 'toJSON' , { value : function ( ) { return serializeError ( this ) ; } , configurable : true , writable : true } ) ; }
add a `toJSON` method to an error which allows for errors in validation reports to be serialized properly by `JSON.stringify`.
add a toJSON method to an error which allows for errors in validation reports to be serialized properly by JSON . stringify .