Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>javascript prototype to classNew to Visual Studio Code? Get it now.
javascript prototype to class

javascript prototype to class

Eric Zhou

|
407 installs
| (1) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Javascript Prototype to Class

Convert old-fasioned functions with prototype to a modern class.

Select the funtions and prototype methods, nothing more. Press [Ctrl + Shift + P], Type javascript prototype to class Then the code is converted to modern class.

The main logic is maintained in

https://github.com/EricWebsmith/prototype_to_class

Issues

  • I tested it only by some code in leetcode. I will add more test cases in the future.
  • comments outside functions are ignored.
  • You have to select the whole function and the prototype method, nothing more, or it will be erroneous.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft