#url #normalization #normalize #nodejs

normalize-url-rs

Port of Node.js URL normalization library

3 unstable releases

0.2.0 Sep 4, 2023
0.1.1 Feb 17, 2023
0.1.0 Jan 28, 2023

#10 in #normalize

Download history 4/week @ 2024-02-10 26/week @ 2024-02-17 115/week @ 2024-02-24 61/week @ 2024-03-02 97/week @ 2024-03-09 174/week @ 2024-03-16 79/week @ 2024-03-23 78/week @ 2024-03-30 31/week @ 2024-04-06 179/week @ 2024-04-13 41/week @ 2024-04-20 35/week @ 2024-04-27 36/week @ 2024-05-04 2/week @ 2024-05-11 38/week @ 2024-05-18

115 downloads per month

MIT license

20KB
348 lines

normalize-url-rs

normalize-url-rs is a port of Node.js normalize-url package for the Rust programming language.

Documentation: https://docs.rs/normalize-url-rs

Sample usage

use normalize_url_rs::{normalize_url, OptionsBuilder};

let options = OptionsBuilder::default().build().unwrap();
let result = normalize_url("https://www.rust-lang.org/", &options);

assert_eq!(result.unwrap(), "https://rust-lang.org")

Known differences vs original Node.js library

  • Custom protocols are not supported
  • Data URLs are not supported

lib.rs:

normalize-url-rs is a port of Node.js normalize-url package for the Rust programming language.

Sample usage

use normalize_url_rs::{normalize_url, OptionsBuilder};

let options = OptionsBuilder::default().build().unwrap();
let result = normalize_url("https://www.rust-lang.org/", &options);

assert_eq!(result.unwrap(), "https://rust-lang.org")

Known differences vs original Node.js library

  • Custom protocols are not supported
  • Data URLs are not supported

Dependencies

~5.5–7.5MB
~165K SLoC