Symbol Prototype Description Codemod
Introduction
This codemod removes the dependency on the symbol.prototype.description
module and replaces its usage with the built-in ES feature. It eliminates the need for additional imports, reduces bundle size, and enhances code performance by directly accessing the description
property of Symbol
instances.
Before
import description from 'symbol.prototype.description';const mySymbol = description(Symbol('foo'));console.log(mySymbol); // Output: 'foo'
After
const mySymbol = Symbol('foo').description;console.log(mySymbol); // Output: 'foo'
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community