config options for normalizePosixPath and normalizePath

interface NormalizePathConfig {
    keepRelative?: boolean;
}

Properties

Properties

keepRelative?: boolean

specify whether or not to preserve the relative leading dotslash ("./") directory specifier?

here is what you would get for each of the following input values, based on how you configure this setting:

  • input = "././//../a/./././b.txt"
    • true: ".//a/./././b.txt"
    • false: "/a/./././b.txt"
  • input = "./././././"
    • true: "./"
    • false: ""
  • input = "a/b.txt/././../././"
    • true: "a"
    • false: "a"
  • input = "/./././/a/b.txt"
    • true: "//a/b.txt"
    • false: "//a/b.txt"

true