#url #normalize #normalization #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

#14 in #normalize

Download history 73/week @ 2024-09-01 239/week @ 2024-09-08 120/week @ 2024-09-15 183/week @ 2024-09-22 120/week @ 2024-09-29 129/week @ 2024-10-06 505/week @ 2024-10-13 448/week @ 2024-10-20 211/week @ 2024-11-03 168/week @ 2024-11-10 70/week @ 2024-11-17 51/week @ 2024-11-24 43/week @ 2024-12-01 46/week @ 2024-12-08 30/week @ 2024-12-15

173 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

~6–8MB
~142K SLoC