function parseOptions(type) {
  const ret = {
    indentChar: ' ',
    indentSize: 2,
    indentText: ''
  }

  if (Number.isSafeInteger(type)) {
    ret.indentSize = Number(type)
  } else if (type === 'tab') {
    ret.indentChar = '\t'
    ret.indentSize = 1
  }
  ret.indentText = ret.indentChar.repeat(ret.indentSize)

  return ret
}
Normalize options.
@param {number|"tab"|undefined} type The type of indentation.
@returns { { indentChar: string, indentSize: number, indentText: string } } Normalized options.