| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 1 12566 12565 1861 1480 381 | 'use strict';
var
hasComment = /(\/\/)/,
startWithLineComment = /(^\/\/)/;
// check for line comment on the line
module.exports = function checkForStart( line ) {
if ( typeof line !== 'string' ) { return; }
if ( hasComment.test(line) ) {
// ex }, but only if we've already establish that we're not in a hash
if ( startWithLineComment.test(line.trim()) ) {
return true;
}
else {
return false;
}
}
} |