Converts old-style value to new-style value.

@param {any} x - The value to convert.
@returns {({include: string[], exclude: string[], replace: string[]})[]} Normalized value.
function normalizeValue(x) {
    if (Array.isArray(x)) {
        return x
    }

    return Object.keys(x).map(pattern => ({
        include: [pattern],
        exclude: [],
        replace: x[pattern],
    }))
}