@E18e/Reflect.Getprototypeof

1.0.5Last update Aug 9, 2024
by@e18e

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

background illustrationGet Started Now