Skip to content

Instantly share code, notes, and snippets.

@Bradshaw
Created June 19, 2014 09:27
Show Gist options
  • Select an option

  • Save Bradshaw/7ea0c4ad4cfe97d4eebd to your computer and use it in GitHub Desktop.

Select an option

Save Bradshaw/7ea0c4ad4cfe97d4eebd to your computer and use it in GitHub Desktop.
How to do comment-switching on a single line
/*
This switch is used for development, when I want to be able to run the server without the extra services running.
prefilledArray is an array of objects that is a sample of what the extra services return.
*/
// In no-services dev mode
var data = /**[];//**/prefilledArray;
// Otherwise
var data = /**/[];//**/prefilledArray;
// The difference is a single slash...
// ...here: v
var data = /**[];//**/prefilledArray;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment