code: function camelToUnderscore(str) {
              return s.split(/(?=[A-Z])/).map(function (p) {
                  return p.charAt(0).toUpperCase() + p.slice(1);
              }).join('_');
          }
docs: Converts camel case string to underscore.
  @param {string} str - the string to convert.
  @returns {string}