@alextheman/utility - v4.3.5
    Preparing search index...

    Variable normaliseImportPathConst

    normaliseImportPath: (importPath: string) => string = normalizeImportPath

    Normalises an import path meant for use in an import statement in JavaScript. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.

    If the path starts with ./, it is preserved (unlike what would happen with path.posix.normalize() normally).

    Helpful for custom linter rules that need to check (or fix) import paths.

    Type Declaration

      • (importPath: string): string
      • Normalizes an import path meant for use in an import statement in JavaScript. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.

        If the path starts with ./, it is preserved (unlike what would happen with path.posix.normalize() normally).

        Helpful for custom linter rules that need to check (or fix) import paths.

        Parameters

        • importPath: string

          The import path to normalize.

        Returns string

        The import path normalized.

    The import path to normalise.

    The import path normalised.