Function default

  • Converts value to a property path array.

    Parameters

    • value: string[]

      The value to convert.

    Returns string[]

    Returns the new property path array.

    Since

    5.7.0

    Example

    toPath('a.b.c')
    // => ['a', 'b', 'c']

    toPath('a[0].b.c')
    // => ['a', '0', 'b', 'c']
  • Parameters

    • value: string

    Returns string[]