node-semver

Crates.ionode-semver
lib.rsnode-semver
version2.1.0
sourcesrc
created_at2021-05-19 00:48:25.516819
updated_at2022-09-21 02:32:56.617177
descriptionA node-semver compliant semver implementation in Rust.
homepage
repositoryhttps://github.com/felipesere/node-semver-rs
max_upload_size
id399218
size102,557
Felipe Seré (felipesere)

documentation

https://docs.rs/node-semver

README

This crate is a pure Rust-based implementation of JavaScript's node-semver. That is, it's designed to be compatible with Node/NPM's particular flavor of semver (which the semver crate is not).

It is designed for Rust programs and libraries meant for JavaScript tooling, and does its best to stay compatible with node-semver.

It also supports serde serialization, converting versions and ranges to strings.

Usage

node-semver includes two main types: [Version] and [Range]. See the documentation for more details.:

use node_semver::{Range, Version};

let version: Version = "1.2.3".parse().unwrap();
let range: Range = "^1.2".parse().unwrap();

assert!(version.satisfies(&range));
Commit count: 32

cargo fmt