jason0x43/vim-js-indent — pull request #2 by alvan (2014-08-26 03:14:34+00:00)
Title: make it works better with line comment

test code:

(function() {
// js file for test

/**
* make the int second time to string 00:00:00
* @param {type} second
* @param {type} digit
* @returns {String}
*/
var f = function(second, digit) {
/*
* some comments
*/
return (sign + arr.join(':').replace(/\b(\d)\b/g, "0$1"));
};

// var f2 = function(second, digit) {
// var arr = [],
// sign = '';
// var test = 'zz';
// var qq = 'ddd';

// if (0 < second) {
// sign = '+';
// }
// };

var urlError = function() {
/* hahah */
throw new Error('A "url" property or function must be specified');
};
})();