To keep the dependencies of Rudi itself to a minimum, functionality that requires external libraries is implemented in standalone Go modules. This makes it possible for integrators to choose exactly what kind of functions they need and which dependencies they can bear.
All of the following modules are kept in the rudi-contrib repository on GitHub.
The extended library also serves as a great tutorial on how to wrap existing code in Rudi 😄
Note that the rudi
interpreter (the binary) has all of these modules built-in, as the CLI
interpreter is its own Go module and does not contribute to the Rudi language repository.
semver
– parses a string as a semantic version
new-key-set
– create a set filled with the keys of an objectnew-set
– create a set filled with the given valuesset-delete
– returns a copy of the set with the given values removed from itset-diff
– returns the difference between two setsset-eq?
– returns true if two sets hold the same valuesset-has-any?
– returns true if the set contains any of the given valuesset-has?
– returns true if the set contains all of the given valuesset-insert
– returns a copy of the set with the newly added values inserted to itset-intersection
– returns the insersection of two setsset-list
– returns a sorted vector containing the values of the setset-size
– returns the number of values in the setset-superset-of?
– returns true if the other set is a superset of the base setset-symdiff
– returns the symmetric difference between two setsset-union
– returns the union of two or more sets
uuidv4
– returns a new, randomly generated v4 UUID