Crates.io | nodejs-semver |
lib.rs | nodejs-semver |
version | 4.1.0 |
source | src |
created_at | 2023-09-05 13:19:41.753329 |
updated_at | 2024-11-05 03:10:53.133718 |
description | A node-semver compliant semver implementation in Rust. |
homepage | |
repository | https://github.com/cijiugechu/nodejs-semver |
max_upload_size | |
id | 964273 |
size | 143,817 |
nodejs-semver
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
.
This project has been forked from node-semver since September of 2023, but a lot has changed; For more details, see Changelog.
nodejs-semver
includes two main types: [Version] and [Range]. See the
documentation for more details.:
use nodejs_semver::{Range, Version};
let version: Version = "1.2.3".parse().unwrap();
let range: Range = "^1.2".parse().unwrap();
assert!(version.satisfies(&range));
The following are a list of Cargo features that can be enabled: