The library uses json-schema to validate JavaScript objects. As an exception conform also supports {type:'function'} with
support for optional required field. (However at the moment it does not support functions outside top level.)