sort-to-tosorted
Codemod to convert [...array].sort() into array.toSorted() (ES2023)
Run the script directly from the Codemod Registry
bash
Examples
Before:
ts
After:
ts
Installation
bash
Usage
Document the exact migration this codemod performs before publishing. At minimum, cover:
- The concrete syntax or API patterns it rewrites
- The file types or paths it targets
- Important preserve/no-op cases and exclusions
Development
bash
License
MIT