lib/gcli/commands/server/firefox.js
function wordWrap(input, length) {
  // LOOK! Over there! Is it an airplane?
  var wrapper = new RegExp('.{0,' + (length - 1) + '}([ $|\\s$]|$)', 'g');
  return input.match(wrapper).slice(0, -1).map(function(s) {
    return s.replace(/ $/, '');
  });
  // Ah, no - it's just superman, anyway, on with the code ...
}
function wordWrap(input, length) {
  // LOOK! Over there! Is it an airplane?
  var wrapper = new RegExp('.{0,' + (length - 1) + '}([ $|\\s$]|$)', 'g');
  return input.match(wrapper).slice(0, -1).map(function(s) {
    return s.replace(/ $/, '');
  });
  // Ah, no - it's just superman, anyway, on with the code ...
}
function wordWrap ( input , length ) { // LOOK! Over there! Is it an airplane? var wrapper = new RegExp ( '.{0,' + ( length - 1 ) + '}([ $|\\s$]|$)' , 'g' ) ; return input . match ( wrapper ) . slice ( 0 , - 1 ) . map ( function ( s ) { return s . replace ( /  $ / , '' ) ; } ) ; // Ah, no - it's just superman, anyway, on with the code ... }
Return an input string split into lines of a given length
Return an input string split into lines of a given length