Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 28, 2024 via pnpm

uri-js 2.1.1

An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.
Package summary
Share
4
issues
3
high severity
vulnerability
2
license
1
1
low severity
license
1
1
license
1
BSD
Package created
13 Mar 2012
Version published
8 Jul 2015
Maintainers
1
Total deps
1
Direct deps
0
License
BSD

Issues

4

3 high severity issues

high
Recommendation: Upgrade to version 3.0.0 or later
via: uri-js@2.1.1
Recommendation: Upgrade to version 3.0.0 or later
via: uri-js@2.1.1
Recommendation: Validate that the package complies with your license policy
via: uri-js@2.1.1
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: uri-js@2.1.1
Collapse
Expand

Licenses

BSD

Invalid
Not OSI Approved
1 Packages, Including:
uri-js@2.1.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of uri-js 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does uri-js do?

URI.js is a JavaScript library that provides parsing, validating and resolving functionality for URIs (Uniform Resource Identifiers) and IRIs (International Resource Identifiers). Fully compliant with multiple RFC (Request for Comments) standards, the library is extendable, allowing custom scheme-dependent processing rules. It also has features for comparing and normalizing URIs, supporting both IPv4 and IPv6 and is designed with versatility for usage in any JavaScript environment, including browsers and Node.js.

How do you use uri-js?

URI.js is available as an npm package and can be installed via npm or yarn. Here's an example of the installation command:

    npm install uri-js
    # OR
    yarn add uri-js

Then, in your JavaScript file, you can require it as follows:

    const URI = require("uri-js");

Alternatively, if you're using ES6+ syntax (ESNEXT) or TypeScript, you can import it this way:

    import * as URI from "uri-js";

Using URI.js involves invoking its methods such as parse(), serialize(), normalize(), resolve(), and others on your URIs. Here are some usage examples:

    //Parse a URI
    let parsed = URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body");

    //Serialize a URI
    let serialized = URI.serialize({scheme : "http", host : "example.com", fragment : "footer"});

    //Normalize a URI
    let normalized = URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html");

    //Resolve a URI
    let resolved = URI.resolve("uri://a/b/c/d?q", "../../g");

Where are the uri-js docs?

The detailed documentation and API references for URI.js are located directly in the README of the GitHub repository. The documentation provides a thorough explanation of each method available in the library and demonstrates how to use the library with specific use case examples. The GitHub repository can be accessed through the link: git+ssh://git@github.com/garycourt/uri-js.git.