Returns the value for path, or fallback if the value is null or undefined.
path
fallback
The path is a string of dot-separated keys (foo.bar.baz). The data is an object of any depth.
foo.bar.baz
data
props('fallback')('a.b')({ a { b: 'Hello World' } })// => "Hello World"props('fallback')('a.b.c')({ a { b: 'Hello World' } })// => "fallback" Copy
props('fallback')('a.b')({ a { b: 'Hello World' } })// => "Hello World"props('fallback')('a.b.c')({ a { b: 'Hello World' } })// => "fallback"
Generated using TypeDoc
Returns the value for
path
, orfallback
if the value is null or undefined.The
path
is a string of dot-separated keys (foo.bar.baz
). Thedata
is an object of any depth.