Skip to content

object.and() #265

@hueniverse

Description

@hueniverse

Creates an 'all or nothing' dependency between keys. Similar to object.with() with the difference that with() is between one context key and many others while and() is between all the listed keys:

with('a', ['b', 'c']) - if a is present, both b and c are required, but if a is not and b is, c is not required.
and('a', 'b', 'c') - if any of the listed keys is present, all of them are required.

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions