Skip to content

Commit

Permalink
feat: 🎸 Convert request id to string of base 36 (#2848)
Browse files Browse the repository at this point in the history
  • Loading branch information
ognjenjevremovic committed Feb 23, 2021
1 parent 914000d commit 291afba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reqIdGenFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = function () {
const maxInt = 2147483647
let nextReqId = 0
return function genReqId (req) {
return (nextReqId = (nextReqId + 1) & maxInt)
nextReqId = (nextReqId + 1) & maxInt
return `req-${nextReqId.toString(36)}`
}
}

0 comments on commit 291afba

Please sign in to comment.