src/record/json-path.js
function tokenize (path) {
  const tokens = []

  const parts = path.split('.')

  for (let i = 0; i < parts.length; i++) {
    const part = parts[i].trim()

    if (part.length === 0) {
      continue
    }

    const arrayIndexes = part.split(SPLIT_REG_EXP)

    tokens.push(arrayIndexes[0])

    for (let j = 1; j < arrayIndexes.length; j++) {
      if (arrayIndexes[j].length === 0) {
        continue
      }

      tokens.push(Number(arrayIndexes[j]))
    }
  }
  return tokens
}
function tokenize (path) {
  const tokens = []

  const parts = path.split('.')

  for (let i = 0; i < parts.length; i++) {
    const part = parts[i].trim()

    if (part.length === 0) {
      continue
    }

    const arrayIndexes = part.split(SPLIT_REG_EXP)

    tokens.push(arrayIndexes[0])

    for (let j = 1; j < arrayIndexes.length; j++) {
      if (arrayIndexes[j].length === 0) {
        continue
      }

      tokens.push(Number(arrayIndexes[j]))
    }
  }
  return tokens
}
function tokenize ( path ) { const tokens = [ ] const parts = path . split ( '.' ) for ( let i = 0 ; i < parts . length ; i ++ ) { const part = parts [ i ] . trim ( ) if ( part . length === 0 ) { continue } const arrayIndexes = part . split ( SPLIT_REG_EXP ) tokens . push ( arrayIndexes [ 0 ] ) for ( let j = 1 ; j < arrayIndexes . length ; j ++ ) { if ( arrayIndexes [ j ] . length === 0 ) { continue } tokens . push ( Number ( arrayIndexes [ j ] ) ) } } return tokens }
Parses the path. Splits it into
keys for objects and indices for arrays.

@private
@returns {void}
Parses the path . Splits it into keys for objects and indices for arrays .