#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

#12 in #normalize

Download history 58/week @ 2024-07-24 207/week @ 2024-07-31 102/week @ 2024-08-07 59/week @ 2024-08-14 132/week @ 2024-08-21 131/week @ 2024-08-28 155/week @ 2024-09-04 198/week @ 2024-09-11 119/week @ 2024-09-18 170/week @ 2024-09-25 114/week @ 2024-10-02 282/week @ 2024-10-09 534/week @ 2024-10-16 219/week @ 2024-10-23 84/week @ 2024-10-30 162/week @ 2024-11-06

1,158 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

~9MB
~164K SLoC