1. Let r be the result of running the steps to with value and keyPath. Rethrow any exceptions.

    2. If r is failure, return failure.

    3. Let key be the result of running the steps to convert a value to a key with r if the multiEntry flag is unset, and the result of running the steps to with r otherwise. Rethrow any exceptions.

    4. If key is invalid, return invalid.

    5. Return key.

    The steps to evaluate a key path on a value with value and keyPath are as follows. The result of these steps is an ECMAScript value or failure, or the steps may throw an exception.

    1. If keyPath is a list of strings, then:

      1. Let result be a new Array object created as if by the expression .

      2. Let i be 0.

      3. Return result.

        This will only ever “recurse” one level since sequences can’t ever be nested.

    2. Let identifiers be the result of strictly splitting keyPath on U+002E FULL STOP characters (.).

    3. For each identifier in identifiers, jump to the appropriate step below:

      If (value) is String, and identifier is “length

      Let value be a Number equal to the number of elements in value.

      If value is an Array and identifier is “length

      Let value be ToLength( Get(value, “length“)).

      If value is a [Blob](https://w3c.github.io/FileAPI/#dfn-Blob) and identifier is “size

      Let value be a Number equal to value’s .

      If value is a [Blob](https://w3c.github.io/FileAPI/#dfn-Blob) and identifier is “type

      If value is a [File](https://w3c.github.io/FileAPI/#dfn-file) and identifier is “name

      Let value be a String equal to value’s .

      If value is a [File](https://w3c.github.io/FileAPI/#dfn-file) and identifier is “lastModified

      Let value be a Number equal to value’s [lastModified](https://w3c.github.io/FileAPI/#dfn-lastModified).

      If value is a [File](https://w3c.github.io/FileAPI/#dfn-file) and identifier is “lastModifiedDate

      Let value be a new object with [[DateValue]] internal slot equal to value’s .

      Otherwise

      1. If Type(value) is not Object, return failure.

      2. Let hop be HasOwnProperty(value, identifier).

      3. If hop is false, return failure.

      4. Let value be Get(value, identifier).

      5. If value is undefined, return failure.

    1. Assert: value is not an .