Skip to content

Conversation

@klparrot
Copy link

Previously gestalt/get returned the value it found or threw an IllegalArgumentException; the or means that if it found a falsey value, rather than returning that value, it threw. This is changed to have it return whatever it finds, and only throw when the requested keys doesn't exist in the configuration.

gestalt/contains? already sort of had that behaviour, except that it only supported a single key, rather than a sequence of keys like you could pass to gestalt/get. This is changed so that you can pass the same arguments to gestalt/contains? as to gestalt/get.

Now, for keys &ks, if (apply gestalt/contains? ks) is true, (apply gestalt/get ks) will return a value, and if (apply gestalt/contains? ks) is false, (apply gestalt/get ks) will throw.

@sfnelson
Copy link

Nice change!

@montoux montoux deleted a comment from sfnelson Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants