Function browserslist::resolve
source · pub fn resolve<I, S>(queries: I, opts: &Opts) -> Result<Vec<Distrib>, Error>
Expand description
Resolve browserslist queries.
This is a low-level API.
If you want to load queries from configuration file and
resolve them automatically,
use the higher-level API execute
instead.
use browserslist::{Distrib, Opts, resolve};
let distribs = resolve(["ie <= 6"], &Opts::new()).unwrap();
assert_eq!(distribs[0].name(), "ie");
assert_eq!(distribs[0].version(), "6");
assert_eq!(distribs[1].name(), "ie");
assert_eq!(distribs[1].version(), "5.5");