All Projects â†’ dhruvdutt â†’ es5-function-to-class-codemod

dhruvdutt / es5-function-to-class-codemod

Licence: MIT license
📩 Transform ES5 Functions to ES6 Classes

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to es5-function-to-class-codemod

async-await-codemod
Codemod script for migrating promise-based functions to use async/await syntax
Stars: ✭ 22 (-26.67%)
Mutual labels:  codemod, jscodeshift
ember-angle-brackets-codemod
Codemod to convert curly braces syntax to angle brackets syntax
Stars: ✭ 58 (+93.33%)
Mutual labels:  codemod, jscodeshift
tiny-treeshaker
đŸŒłđŸ„€ A tiny codemod for tree shaking (experimental) đŸŒłđŸ„€
Stars: ✭ 92 (+206.67%)
Mutual labels:  codemod, jscodeshift
codemod-v4
codemod cli for antd v4 upgrade
Stars: ✭ 84 (+180%)
Mutual labels:  codemod, jscodeshift
font-awesome-codemod
⚙ Font Awesome codemod script
Stars: ✭ 46 (+53.33%)
Mutual labels:  codemod, jscodeshift
jscodeshift-typescript-example
jscodeshift typescript codemod example
Stars: ✭ 27 (-10%)
Mutual labels:  codemod, jscodeshift
preact-codemod
🍧 Shave some bytes by using Preact.
Stars: ✭ 39 (+30%)
Mutual labels:  codemod, jscodeshift
tscodeshift
tscodeshift is a toolkit for running codemods over multiple TS files
Stars: ✭ 49 (+63.33%)
Mutual labels:  codemod
django-codemod
A tool to automatically fix Django deprecations.
Stars: ✭ 145 (+383.33%)
Mutual labels:  codemod
gogoAST
The simplest tool to parse/transform/generate code on ast
Stars: ✭ 29 (-3.33%)
Mutual labels:  jscodeshift
graphql2ts
Transform .graphql to graphql-js typescript
Stars: ✭ 41 (+36.67%)
Mutual labels:  codemod
taro2-to-3
èź© Taro2 éĄč盼è‡Ș抹捇çș§ćˆ° Taro3 éĄčç›źâš’ïžă€‚
Stars: ✭ 31 (+3.33%)
Mutual labels:  codemod
babel-plugin-hyperscript-to-jsx
This plugin transforms react-hyperscript into JSX. Intended to be used as codemod.
Stars: ✭ 20 (-33.33%)
Mutual labels:  codemod
ember-data-codemod
A codemod to upgrade to new ember-data packages
Stars: ✭ 13 (-56.67%)
Mutual labels:  codemod
Ts Migrate
A tool to help migrate JavaScript code quickly and conveniently to TypeScript
Stars: ✭ 4,246 (+14053.33%)
Mutual labels:  codemod
awesome-codemods
Awesome list of codemods for various languages, libraries and frameworks
Stars: ✭ 98 (+226.67%)
Mutual labels:  codemod
rn-update-deprecated-modules
Codemod to update import declarations as per react-native > 0.59.x deprecations.
Stars: ✭ 73 (+143.33%)
Mutual labels:  codemod
moment-dayjs-codemod
A Codemod to migrate from moment.js to day.js
Stars: ✭ 20 (-33.33%)
Mutual labels:  codemod
babel-codemod-example
An example of how to use babel as a codemod
Stars: ✭ 24 (-20%)
Mutual labels:  codemod
Astexplorer
A web tool to explore the ASTs generated by various parsers.
Stars: ✭ 4,330 (+14333.33%)
Mutual labels:  jscodeshift

Transform ES5 Functions to ES6 Classes 📩

npm Awesome

Live Demo đŸ’»

Features 💯

  • Methods on prototype
  • Static Methods on prototype
  • Variables and Literals on prototype
  • Getters, Setters with defineProperty
  • Block-level Variables

Sample Input 🛮 and Output 🚀

input2

Complex example: Multiple functions in same file with one of the functions having same name.

Setup and Run 🏃

npm i -g jscodeshift
git clone --depth=1 https://github.com/dhruvdutt/es5-function-to-class-codemod codemod && cd codemod
jscodeshift -t func-to-class.js example/input.js
Similar project - lebab. It doesn't currently support:
  • Static Methods on prototype
  • Block-level Variables
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].