• Check if a string s is relative path.

    Parameters

    • pathname: string

      The path to process.

    Returns boolean

    True if s doesn't start with slash and doesn't include colon and double slash.

    pc.path.isRelativePath("file.txt"); // returns true
    pc.path.isRelativePath("path/to/file.txt"); // returns true
    pc.path.isRelativePath("./path/to/file.txt"); // returns true
    pc.path.isRelativePath("../path/to/file.jpg"); // returns true
    pc.path.isRelativePath("/path/to/file.jpg"); // returns false
    pc.path.isRelativePath("http://path/to/file.jpg"); // returns false