lib/_cli/cli-pki.js
function fieldAsOption (field) {
  var option = ''
  for (var i = 0; i < field.length; i++) {
    var c = field.charAt(i)
    if (c < 'a') {
      option = option + '-' + c.toLowerCase()
    } else {
      option += c
    }
  }
  return option
}
function fieldAsOption (field) {
  var option = ''
  for (var i = 0; i < field.length; i++) {
    var c = field.charAt(i)
    if (c < 'a') {
      option = option + '-' + c.toLowerCase()
    } else {
      option += c
    }
  }
  return option
}
function fieldAsOption ( field ) { var option = '' for ( var i = 0 ; i < field . length ; i ++ ) { var c = field . charAt ( i ) if ( c < 'a' ) { option = option + '-' + c . toLowerCase ( ) } else { option += c } } return option }
Converts a camelCase field name to lowercase hyphen-delimited format for
use as a command-line option. For example, this method would convert
'optionName' to 'option-name'.
@param {String} field - Name of the field to convert.
@returns {String} Field name in lowercase hyphen-delimited format.
Converts a camelCase field name to lowercase hyphen - delimited format for use as a command - line option . For example this method would convert optionName to option - name .