json-to-js Enhanced with MenuThis extension is a fork of the original json-to-js with added menu bar options for enhanced usability. Added Features
JSON to JS converter
UsingSelect a JSON string in the editor and in press It is especially useful when you're using a linter with strict rules on code styling. eg.: ESLint + eslint-config-airbnb Before (JSON) x After (JS object)OptionsYou can customize the options in Settings / Extensions / JSON to JS converter. Below are the available options: (requires VSCode restart) Add Trailing CommasAdds a trailing comma in the end of every object or array keys. Makes the result object source control friendly.
Default: Identation SizeSets the number of spaces used in indentation.
Default: KeybindsThe default keybind to convert JSON strings into JS objects is Release Notes0.2.0-- Option to add trailing commas -- Customizable indentation size -- Default keybing 0.1.1-- Stability improvements 0.1.0-- Initial Release |