Skip to content

Commit 2c8bedb

Browse files
committed
replace "util.inspect.custom" by global Symbol for more flexible
1 parent 5071636 commit 2c8bedb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/RateLimiterRes.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const util = require('util');
2-
31
module.exports = class RateLimiterRes {
42
constructor(remainingPoints, msBeforeNext, consumedPoints, isFirstInDuration) {
53
this.remainingPoints = typeof remainingPoints === 'undefined' ? 0 : remainingPoints; // Remaining points in current duration
@@ -52,7 +50,7 @@ module.exports = class RateLimiterRes {
5250
};
5351
}
5452

55-
[util.inspect.custom]() {
53+
[Symbol.for("nodejs.util.inspect.custom")]() {
5654
return this._getDecoratedProperties();
5755
}
5856

0 commit comments

Comments
 (0)