1 unstable release
0.1.0 | Mar 10, 2024 |
---|
#19 in #lists
14KB
rinse
declutter url lists
use rinse::Rinse;
fn main() {
let rinse = Rinse::default();
// Remove duplicate URLs
assert!(rinse.declutter_url("https://www.wikipedia.org"));
assert!(!rinse.declutter_url("https://www.wikipedia.org"));
// Remove duplicate URLs without reading query parameter values
assert!(rinse.declutter_url("https://httpbin.org/get?hello=world"));
assert!(!rinse.declutter_url("https://httpbin.org/get?hello=earth"));
assert!(rinse.declutter_url("https://httpbin.org/get?hello=world&foo=bar"));
// Allowed extensions
assert!(rinse.declutter_url("https://www.rust-lang.org/"));
assert!(rinse.declutter_url("https://www.rust-lang.org/static/scripts/init.js"));
assert!(!rinse.declutter_url("https://www.rust-lang.org/static/images/site.webmanifest"));
assert!(!rinse.declutter_url("https://www.rust-lang.org/static/styles/a11y-dark.css"));
}
Not yet implemented