Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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