es-define-property Codemod
Introduction
This codemod replaces the use of the es-define-property
npm module with the built-in Object.defineProperty
method from JavaScript. The goal is to reduce the number of dependencies in the codebase, thereby optimizing bundle size and improving overall performance.
Before
import defineProperty from 'es-define-property';defineProperty(obj, 'key', {value: 'value',writable: true,});
After
Object.defineProperty(obj, 'key', {value: 'value',writable: true,});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community