lib/info.js
function deepSplitString (input, separators) {
  if (input === null || typeof input === 'undefined') {
    return input
  }
  if (separators.length === 0) {
    return input
  }

  const sep = separators.shift()
  let output = input

  if (typeof input === 'string') {
    output = splitString(input, sep)
  } else if (Array.isArray(input)) {
    output = input.map(i => splitString(i, sep))
  } else if (typeof input === 'object') {
    output = {}
    Object.keys(input).forEach(key => {
      output[key] = splitString(input[key], sep)
    })
  }

  if (separators.length > 0) {
    return deepSplitString(output, separators)
  } else {
    return output
  }
}
function deepSplitString (input, separators) {
  if (input === null || typeof input === 'undefined') {
    return input
  }
  if (separators.length === 0) {
    return input
  }

  const sep = separators.shift()
  let output = input

  if (typeof input === 'string') {
    output = splitString(input, sep)
  } else if (Array.isArray(input)) {
    output = input.map(i => splitString(i, sep))
  } else if (typeof input === 'object') {
    output = {}
    Object.keys(input).forEach(key => {
      output[key] = splitString(input[key], sep)
    })
  }

  if (separators.length > 0) {
    return deepSplitString(output, separators)
  } else {
    return output
  }
}
function deepSplitString ( input , separators ) { if ( input === null || typeof input === 'undefined' ) { return input } if ( separators . length === 0 ) { return input } const sep = separators . shift ( ) let output = input if ( typeof input === 'string' ) { output = splitString ( input , sep ) } else if ( Array . isArray ( input ) ) { output = input . map ( i => splitString ( i , sep ) ) } else if ( typeof input === 'object' ) { output = { } Object . keys ( input ) . forEach ( key => { output [ key ] = splitString ( input [ key ] , sep ) } ) } if ( separators . length > 0 ) { return deepSplitString ( output , separators ) } else { return output } }
Splits a string into a, possibly nested, array or object using the given
separators.

@private
Splits a string into a possibly nested array or object using the given separators .