lib/util/rule-codes.js
function ruleCodes(flags, value) {
  var flag = flags.FLAG
  var result = []
  var length
  var index

  if (!value) {
    return result
  }

  if (flag === 'long') {
    index = 0
    length = value.length

    while (index < length) {
      result.push(value.substr(index, 2))

      index += 2
    }

    return result
  }

  return value.split(flag === 'num' ? ',' : '')
}
function ruleCodes(flags, value) {
  var flag = flags.FLAG
  var result = []
  var length
  var index

  if (!value) {
    return result
  }

  if (flag === 'long') {
    index = 0
    length = value.length

    while (index < length) {
      result.push(value.substr(index, 2))

      index += 2
    }

    return result
  }

  return value.split(flag === 'num' ? ',' : '')
}
function ruleCodes ( flags , value ) { var flag = flags . FLAG var result = [ ] var length var index if ( ! value ) { return result } if ( flag === 'long' ) { index = 0 length = value . length while ( index < length ) { result . push ( value . substr ( index , 2 ) ) index += 2 } return result } return value . split ( flag === 'num' ? ',' : '' ) }
Parse rule codes.
Parse rule codes .