autodoc.js
function splitCamelCase(string) {
    var matcher  = /[^A-Z]([A-Z])|([A-Z])[^A-Z]/g,
        tokens   = [],
        position = 0,
        index, match;

    string || (string = '');

    while (match = matcher.exec(string)) {
      index = typeof match[1] === 'string' ? match.index + 1 : match.index;
      if (position === index) { continue; }
      tokens.push(string.substring(position, index).toLowerCase());
      position = index;
    }
    
    if (position < string.length) {
      tokens.push(string.substring(position).toLowerCase());
    }

    return tokens;
  }
function splitCamelCase(string) {
    var matcher  = /[^A-Z]([A-Z])|([A-Z])[^A-Z]/g,
        tokens   = [],
        position = 0,
        index, match;

    string || (string = '');

    while (match = matcher.exec(string)) {
      index = typeof match[1] === 'string' ? match.index + 1 : match.index;
      if (position === index) { continue; }
      tokens.push(string.substring(position, index).toLowerCase());
      position = index;
    }
    
    if (position < string.length) {
      tokens.push(string.substring(position).toLowerCase());
    }

    return tokens;
  }
function splitCamelCase ( string ) { var matcher = / [^A-Z]([A-Z])|([A-Z])[^A-Z] / g , tokens = [ ] , position = 0 , index , match ; string || ( string = '' ) ; while ( match = matcher . exec ( string ) ) { index = typeof match [ 1 ] === 'string' ? match . index + 1 : match . index ; if ( position === index ) { continue ; } tokens . push ( string . substring ( position , index ) . toLowerCase ( ) ) ; position = index ; } if ( position < string . length ) { tokens . push ( string . substring ( position ) . toLowerCase ( ) ) ; } return tokens ; }
Splits apart a camelCased string.

@private
@param {string} string The string to split.
@returns {Array.<string>} An array containing the parts of the string.

@examples
splitCamelCase('fooBarBaz');      // => ['foo', 'bar', 'baz']
splitCamelCase('Foo123Bar');      // => ['foo123', 'bar']
splitCamelCase('XMLHttpRequest'); // => ['xml', 'http', 'request']
Splits apart a camelCased string .