Small helper function that adds toJSON and util.custom.inspect methods to a given class based on its getters
toJSON
util.custom.inspect
Note: This means that all getters must be pure! (getter that caches after its first invocation is also considered pure in this case)
Optional
Small helper function that adds
toJSONandutil.custom.inspectmethods to a given class based on its getters