Resourceful.Util (Resourceful v0.1.6)

View Source

Extra utility functions. These are for miscellaneous shared functions that don't really fit with any other module but are shared across multiple modules.

Summary

Functions

Allows :except or :only options to be set in a keyword set of options. The options and the set are given as arguments and, depending on the options, a subset (or the set itself) will be returned.

Functions

except_or_only!(opts, set)

@spec except_or_only!(
  keyword(),
  %MapSet{map: term()} | list()
) :: list()

Allows :except or :only options to be set in a keyword set of options. The options and the set are given as arguments and, depending on the options, a subset (or the set itself) will be returned.

An exception will be raised if invalid arguments are passed or if both :except and :only are passed.