pub fn js_value_to_pattern(value: &JsValue<'_>) -> Pattern
Converts a js-value into a Pattern for matching resources.