#normalize #nodejs #url #normalization

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 108/week @ 2024-07-01 146/week @ 2024-07-08 93/week @ 2024-07-15 96/week @ 2024-07-22 108/week @ 2024-07-29 197/week @ 2024-08-05 42/week @ 2024-08-12 130/week @ 2024-08-19 157/week @ 2024-08-26 67/week @ 2024-09-02 243/week @ 2024-09-09 118/week @ 2024-09-16 185/week @ 2024-09-23 116/week @ 2024-09-30 129/week @ 2024-10-07 506/week @ 2024-10-14

938 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–7MB
~139K SLoC