5 stable releases

2.2.1 Aug 22, 2019
2.2.0 Mar 18, 2019
2.1.0 Feb 27, 2019
2.0.0 Feb 27, 2019
1.0.0 Feb 27, 2019

#23 in #println

30 downloads per month

MIT license

11KB
161 lines

Build Status Latest Version Rust Documentation codecov

Query and compare the semver of a crate on crates.io.

See the rs docs. Github repo.

Example

use cratesiover::Status;
let query = cratesiover::query("cratesiover", &env!("CARGO_PKG_VERSION")).unwrap();

match query {
  Status::Behind(ver) => println!("crate is behind the version on crates.io {}", ver),
  Status::Equal(ver) => println!("crate is equal to the version on crates.io {}", ver),
  Status::Ahead(ver) => println!("crate is ahead of the version on crates.io {}", ver),
}

Dependencies

~20–32MB
~550K SLoC