Function isSubpath

    • Returns whether the given filepath is a sub-path to the given base path.

      Parameters

      • Optionaloptions: { basepath?: string; filepath: string }

        Options.

        • Optionalbasepath?: string

          The base path to test against filepath; default is CWD.

        • filepath: string

          The path to test from basepath.

      Returns boolean

      Is filepath a sub-path of basepath.