@E18e/Symbol.Prototype.Description

/icons/calendar.svg

Last update

Aug 9, 2024

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

background illustrationGet Started Now