Skip to content

zepto-lang/semver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semver

A simple semantic versioning utility for zepto.

Usage

The interface is akin to that of npm, albeit much simpler.

(import-all "semver" "sv")

(sv:parse "1.1.0") ; will return a semver object
(sv:parse ">1.1.0") ; will also return a semver object, the comparator is preserved
(sv:valid? "10.3.2") ; will return true
(sv:valid? "foo.bar") ; will return false
(sv:gt "1.1.0" "1.0.0") ; will return true
(sv:gt (sv:parse "1.1.0") "1.0.0") ; this will also work
(sv:matches "1.2.0" ">1.1.0") ; will return true - the second argument is the constraint
```

<hr/>

Have fun!

About

A semantic versioning library for zepto

Resources

License

Stars

Watchers

Forks

Packages

No packages published