function defineConvert(fromRegexp, toStr) {
    return filePath => filePath.replace(fromRegexp, toStr)
}
Creates a function which replaces a given path.

@param {RegExp} fromRegexp - A `RegExp` object to replace.
@param {string} toStr - A new string to replace.
@returns {function} A function which replaces a given path.