#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

#14 in #normalize

Download history 132/week @ 2024-11-14 67/week @ 2024-11-21 37/week @ 2024-11-28 34/week @ 2024-12-05 35/week @ 2024-12-12 48/week @ 2024-12-19 32/week @ 2024-12-26 57/week @ 2025-01-02 28/week @ 2025-01-09 133/week @ 2025-01-16 98/week @ 2025-01-23 202/week @ 2025-01-30 104/week @ 2025-02-06 534/week @ 2025-02-13 562/week @ 2025-02-20 433/week @ 2025-02-27

1,643 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–8MB
~141K SLoC