docs/lib/remove-fpt-from-path.js

10 строки
471 B
JavaScript
Исходник Обычный вид История

import slash from 'slash'
import nonEnterpriseDefaultVersion from './non-enterprise-default-version.js'
2021-01-14 21:34:32 +03:00
// This is a convenience function to remove free-pro-team@latest from all
// **user-facing** aspects of the site (particularly URLs) while continuing to support
// free-pro-team@latest as a version both in the codebase and in content/data files.
export default function removeFPTFromPath(path) {
2021-01-14 21:34:32 +03:00
return slash(path.replace(`/${nonEnterpriseDefaultVersion}`, ''))
}