Skip to content
Snippets Groups Projects
Commit 644e1efc authored by Alexander Turenko's avatar Alexander Turenko Committed by Igor Munkin
Browse files

config/schema: add <schema object>:get()

It allows to acquire a nested data with several convenience properties.

* Optional chaining semantic: `<schema object>:get(data, 'foo.bar')`
  works similarly to TypeScript's `data?.foo?.bar` operator.
* Path validation against the schema: it prevents attempt to get an
  unknown field and attempt to index a scalar value.

Part of #8725

NO_DOC=the module is for internal use from the config code
NO_CHANGELOG=see NO_DOC
parent 8ef56d1a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment