Reflect.getPrototypeOf Codemod
Introduction
This codemod replaces calls to the reflect.getprototypeof
module with the built-in Reflect.getPrototypeOf
function. This change helps to eliminate an unnecessary dependency, thereby reducing bundle size and improving code performance.
Before
import reflect from 'reflect.getprototypeof';const proto = reflect.getprototypeof(obj);
After
const proto = Reflect.getPrototypeOf(obj);
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community