JS Utils Kit
    Preparing search index...

    Function toWinPath

    • Converts a file system path to Windows (Win32) format.

      On POSIX systems (Linux/macOS), all forward slashes (/) are replaced with backslashes (``).

      Parameters

      • p: string

        The path to convert

      Returns string

      The path using Windows separators (``).

      toWinPath('src/utils/file.ts')
      // => 'src\\utils\\file.ts'
      toWinPath('/usr/local/bin')
      // => '\\usr\\local\\bin'