Skip to content

Commit

Permalink
Changed inspect() to [inspect.custom]() as per nodejs/node#15549
Browse files Browse the repository at this point in the history
  • Loading branch information
rhodgkins committed Oct 18, 2019
1 parent 49aed4e commit ce0850e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ export class HealthChecks extends Function {
stopMonitorPubSubSubscription(subscription: Subscription): void

readonly middleware: RequestHandler

toString(): string
inspect(depth: number, options: NodeJS.InspectOptions): string
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = class Endpoint {
return inspect(this)
}

inspect(depth, opts) {
[inspect.custom](depth, opts) {
opts = Object.assign({}, opts, { depth: (opts.depth || 0) - 1 })
let s = `${this.constructor.name} { `
s += Object.keys(this)
Expand Down
2 changes: 1 addition & 1 deletion lib/HealthChecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class HealthChecks extends Function {
return inspect(this)
}

inspect(depth, opts) {
[inspect.custom](depth, opts) {
opts = Object.assign({}, opts, { depth: (opts.depth || 0) - 1 })
let s = `${this.constructor.name} { `
s += Object.keys(this)
Expand Down
2 changes: 1 addition & 1 deletion lib/SubscriptionInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module.exports = class SubscriptionInfo {
return inspect(this)
}

inspect(depth, opts) {
[inspect.custom](depth, opts) {
opts = Object.assign({}, opts, { depth: (opts.depth || 0) - 1 })
let s = `${this.constructor.name} { `
s += `subName: ${this._subName}, `
Expand Down

0 comments on commit ce0850e

Please sign in to comment.