Skip to content

Latest commit

 

History

History

extlib

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Rudi Extended Library

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

  • semver – parses a string as a semantic version

set

  • new-key-set – create a set filled with the keys of an object
  • new-set – create a set filled with the given values
  • set-delete – returns a copy of the set with the given values removed from it
  • set-diff – returns the difference between two sets
  • set-eq? – returns true if two sets hold the same values
  • set-has-any? – returns true if the set contains any of the given values
  • set-has? – returns true if the set contains all of the given values
  • set-insert – returns a copy of the set with the newly added values inserted to it
  • set-intersection – returns the insersection of two sets
  • set-list – returns a sorted vector containing the values of the set
  • set-size – returns the number of values in the set
  • set-superset-of? – returns true if the other set is a superset of the base set
  • set-symdiff – returns the symmetric difference between two sets
  • set-union – returns the union of two or more sets

uuid

  • uuidv4 – returns a new, randomly generated v4 UUID

yaml

  • from-yaml – decodes a YAML string into a Go value
  • to-yaml – encodes the given value as YAML