Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Repository files navigation

sort-js-object

♠️ ♥️ Traverse and sort JS AST object keys ♦️ ♣️

Github Workflow VS Code Marketplace VS Code Marketplace Downloads VS Code Marketplace Installs



Installation

Install through VS Code extensions. Search for Sort JS Object

Visual Studio Code Market Place: Sort JS Objects

Can also be installed in VS Code: Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install debens.sort-js-object

Usage

Highlight a valid block of JS/TS code and open the command palette using cmd + shift + p, search for Sort JS and hit enter.

Hotkeys

  • Format highlighted code: alt + s

Support

All of ES6, Typescript and legacy decorators should be support. Pull requests are welcome!

How does it work?

sort-js-object finds the highlighted text in the current editor, then using this text builds a AST using @babel/parser, then reorder node arrays on tree using @babel/traverse.

About

VS Code extension for sorting JS object keys

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.