function flatten(input, prefix, target = {}) {
    for (const key in input) {
        const field = (prefix ? prefix + '.' + key : key);

        if (isObjectLike(input[key])) {
            flatten(input[key], field, target);
        } else {
            target[field] = input[key];
        }
    }

    return target;
}
Creates a new object with all nested object properties
concatenated into it recursively.

Nested keys are flattened into a property path:

```js
{
  a: {
    b: {
      c: 1
    }
  },
  d: 1
}
```

```js
{
  "a.b.c": 1,
  "d": 1
}
```

@param  {object} input  - The object to flatten.
@param  {string} prefix - The parent key prefix.
@param  {object} target - The object that will receive the flattened properties.
@return {object} Returns the `target` object.