Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/graphql / dist / bootstrapper / setup / errorMonkeyPatch.ts
Size: Mime:
if (!('toJSON' in Error.prototype)) {
  Object.defineProperty(Error.prototype, 'toJSON', {
    value() {
      const serialized = {}

      Object.getOwnPropertyNames(this).forEach(function(
        this: Error,
        key: string
      ) {
        serialized[key] = this[key]
      },
                                               this)

      return serialized
    },
    configurable: true,
    writable: true,
  })
}