packages/content/lib/database.js
/**
   * Remove base dir and extension from file path
   * @param {string} path - The path of the file.
   * @returns {string} Normalized path
   */
Remove base dir and extension from file path
@param {string} path - The path of the file.
@returns {string} Normalized path
Remove base dir and extension from file path @param { string } path - The path of the file . @returns { string } Normalized path
normalizePath (path) {
    let extractPath = path.replace(this.dir, '')
    const extensionPath = extractPath.substr(extractPath.lastIndexOf('.'))
    const additionalsExt = EXTENSIONS.concat(this.extendParserExtensions)
    if (additionalsExt.includes(extensionPath) || extractPath.startsWith('.')) {
      extractPath = extractPath.replace(/(?:\.([^.]+))?$/, '')
    }
    return extractPath.replace(/\\/g, '/')
  }
normalizePath ( path ) { let extractPath = path . replace ( this . dir , '' ) const extensionPath = extractPath . substr ( extractPath . lastIndexOf ( '.' ) ) const additionalsExt = EXTENSIONS . concat ( this . extendParserExtensions ) if ( additionalsExt . includes ( extensionPath ) || extractPath . startsWith ( '.' ) ) { extractPath = extractPath . replace ( / (?:\.([^.]+))?$ / , '' ) } return extractPath . replace ( / \\ / g , '/' ) }
Remove base dir and extension from file path
 @param {string} path - The path of the file.
Remove base dir and extension from file path @param { string } path - The path of the file .
// Remove the extension from the path if contained at the end or starts with a dot