Skip to content

speced/get-in #48

@vemv

Description

@vemv

(speced/get-in {:foo 2} [:foo :bar :baz]) => error message explaining that 2 does not contain :bar

(speced/get-in {:foo {:bar {}}} [:foo :bar :baz] ::default) => ::default

(speced/get-in {:foo 2} [:foo :bar :baz] ::default) => error message explaining that 2 does not contain :bar

The latter behavior is interesting. Fallback values should only be offered if the last member of the chain was missing, but not for intermediate values.

Essentially it ensures the structure is as expressed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions