Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rk0cc/versum
Semantic Versioning Dart object with flexible version constraint policy
https://github.com/rk0cc/versum
customizable dart semantic-versioning semver version version-constraints versioning
Last synced: 26 days ago
JSON representation
Semantic Versioning Dart object with flexible version constraint policy
- Host: GitHub
- URL: https://github.com/rk0cc/versum
- Owner: rk0cc
- License: bsd-3-clause
- Created: 2022-02-11T11:32:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-03T14:24:58.000Z (over 2 years ago)
- Last Synced: 2024-10-28T08:56:29.268Z (2 months ago)
- Topics: customizable, dart, semantic-versioning, semver, version, version-constraints, versioning
- Language: Dart
- Homepage: https://pub.dev/packages/versum
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Customizable version constraint policy
[![badge](https://img.shields.io/pub/v/versum?include_prereleases&style=flat-square)](https://pub.dev/packages/versum)
![GitHub Sponsors](https://img.shields.io/github/sponsors/rk0cc)Versum allows to custom define version constraint policy depending package manager.
## Usage
**Parse version**
* Constructor
```dart
SemVer constructor = SemVer(major: 1);
```
* Parse from String
```dart
SemVer parse = SemVer.parse("1.0.0");
```**Version constraint**
P.S. Different package has different implementation.
```dart
VersionConstraint constraint = DummyVersionConstraint(">=1.0.0 <2.0.0");bool isInRange = constraint.stastified(SemVer.parse("1.2.0"));
```## License
BSD-3