Open ryardley opened 4 years ago
It could be useful to have a dot syntax for deeply nested objects:
const isAdmin = p`{ user.roles: [? "admin" ] }` isAdmin({ user: { roles: [ "editor", "admin" ] } }); // true
With optional properties no need for optional coalescing as the property is explorative.
const isAdmin = p`{ user.roles?: [? "admin" ] }`
It could be useful to have a dot syntax for deeply nested objects: