node-html-parser 0.1.1

Fast HTML parser for Rust & WASM producing a lightweight DOM with CSS selector querying.
Documentation
#[allow(dead_code)]
pub(crate) fn is_none_or_empty(s: Option<&str>) -> bool {
	match s {
		Some(s) => s.is_empty(),
		None => true,
	}
}

#[allow(dead_code)]
pub(crate) fn opt2str(val: &Option<String>) -> &str {
	match val {
		Some(val) => val.as_str(),
		None => "",
	}
}

#[allow(dead_code)]
pub(crate) fn str2opt(val: &str) -> Option<String> {
	return Some(val.to_owned());
}