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