plugin/init_npm.js
function getContent(func) {
  var lines = func.toString().split('\n');
  // Drop the function declaration and closing bracket
  var onlyBody = lines.slice(1, lines.length -1);
  // Drop line number comments generated by Meteor, trim whitespace, make string
  onlyBody = _.map(onlyBody, function(line) {
    return line.slice(0, line.lastIndexOf("//")).trim();
  }).join('\n');
  // Make it look normal
  return beautify(onlyBody, { indent_size: 2 });
}
function getContent(func) {
  var lines = func.toString().split('\n');
  // Drop the function declaration and closing bracket
  var onlyBody = lines.slice(1, lines.length -1);
  // Drop line number comments generated by Meteor, trim whitespace, make string
  onlyBody = _.map(onlyBody, function(line) {
    return line.slice(0, line.lastIndexOf("//")).trim();
  }).join('\n');
  // Make it look normal
  return beautify(onlyBody, { indent_size: 2 });
}
function getContent ( func ) { var lines = func . toString ( ) . split ( '\n' ) ; // Drop the function declaration and closing bracket var onlyBody = lines . slice ( 1 , lines . length - 1 ) ; // Drop line number comments generated by Meteor, trim whitespace, make string onlyBody = _ . map ( onlyBody , function ( line ) { return line . slice ( 0 , line . lastIndexOf ( "//" ) ) . trim ( ) ; } ) . join ( '\n' ) ; // Make it look normal return beautify ( onlyBody , { indent_size : 2 } ) ; }
getContent inside a function
getContent inside a function