Created
June 13, 2011 17:54
-
-
Save tamzinblake/1023305 to your computer and use it in GitHub Desktop.
alternate comma-first style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//an alternate comma-first style soon to be supported by my js-mode | |
//The assumption is that you will consistently not put the first item in the | |
//list on the same line as the brace, and then want the commas / operators | |
//2 spaces back from there. | |
//normal cases: | |
var test = { | |
prop1: "value1" | |
, prop2: "value2" | |
, prop3: "value3" | |
} | |
var y = [ | |
"value1" | |
, "value2" | |
] | |
function test2 () { | |
var x | |
x.report( | |
"test1" | |
+ "test2" | |
) | |
} | |
//big nested thingy | |
var test = { | |
test1: { | |
test2: { | |
test3: 'this is ok' | |
} | |
, test4: { | |
test5: 'this is weird' | |
, test6: 'this is weird also' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment