function parse(option) {
    if (
        !option ||
        !option.convertPath ||
        typeof option.convertPath !== "object"
    ) {
        return null
    }

    const converters = []
    for (const pattern of normalizeValue(option.convertPath)) {
        const include = toStringArray(pattern.include)
        const exclude = toStringArray(pattern.exclude)
        const fromRegexp = new RegExp(String(pattern.replace[0])) //eslint-disable-line require-unicode-regexp
        const toStr = String(pattern.replace[1])

        converters.push({
            match: createMatch(include, exclude),
            convert: defineConvert(fromRegexp, toStr),
        })
    }

    return combine(converters)
}
function parse(option) {
    if (
        !option ||
        !option.convertPath ||
        typeof option.convertPath !== "object"
    ) {
        return null
    }

    const converters = []
    for (const pattern of normalizeValue(option.convertPath)) {
        const include = toStringArray(pattern.include)
        const exclude = toStringArray(pattern.exclude)
        const fromRegexp = new RegExp(String(pattern.replace[0])) 
        const toStr = String(pattern.replace[1])

        converters.push({
            match: createMatch(include, exclude),
            convert: defineConvert(fromRegexp, toStr),
        })
    }

    return combine(converters)
}
function parse ( option ) { if ( ! option || ! option . convertPath || typeof option . convertPath !== "object" ) { return null } const converters = [ ] for ( const pattern of normalizeValue ( option . convertPath ) ) { const include = toStringArray ( pattern . include ) const exclude = toStringArray ( pattern . exclude ) const fromRegexp = new RegExp ( String ( pattern . replace [ 0 ] ) ) //eslint-disable-line require-unicode-regexp const toStr = String ( pattern . replace [ 1 ] ) converters . push ( { match : createMatch ( include , exclude ) , convert : defineConvert ( fromRegexp , toStr ) , } ) } return combine ( converters ) }
Parses `convertPath` property from a given option object.

@param {object|undefined} option - An option object to get.
@returns {function|null} A function which converts a path., or `null`.
Parses convertPath property from a given option object .