I wanted to implement Sanctuary's gets
function to safely access a nested path on an object, but using Folktale 1.0's functions.
This implementation relies on Folktale's core.operators.get
function. Though it returns a Maybe
instead of value | undefined
.
The gets
method is particular handy for AWS Lambda functions, where the passed event
is often a deeply-nested object.