-
-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Description
The request-received
middleware at https://github.com/cabinjs/request-received exposes a Symbol.for
property, which this package could conditionally consume if interested (as opposed to just generating process.hrtime()
.
e.g. https://github.com/expressjs/response-time/blob/master/index.js#L53 would change from var startAt = process.hrtime()
to var startAt = req[Symbol.for('request-received.startAt')] ? req[Symbol.for('request-received.startAt')] : process.hrtime()