This codemod converts reply.getResponseTime()
to reply.elapsedTime
, reflecting changes in Fastify v5 for retrieving response time.
Before
fastify.get('/route', (req, reply) => {console.log(reply.getResponseTime());return { hello: 'world' };});
After
fastify.get('/route', (req, reply) => {console.log(reply.elapsedTime);return { hello: 'world' };});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community