I am doing work for somebody who would like their JavaScript library organized into categories: CRUD functions, Form functions, etc. They really like the utility of regions in C# and are asking for this in their JavaScript file. Any suggestions? I am using Visual Studio 2017 and Team Foundation Server.
Select the code you want to compress. Press Ctrl+M, CTRL+H. That code will now be collapsible via custom outlining information. For readability, comment above the "region" to give it a name.
To remove the custom region use Ctrl+M, CTRL+U (i.e. in case of wrong selection used). To remove all outlining information from the document altogether use Ctrl+M, CTRL+P.
Source: http://blog.degree.no/2013/05/define-a-region-in-javascript-files-visual-studio-2010-2012/
Official Docu: Outlining in Visual Studio