iiris
iiris copied to clipboard
Support for paths
It might be nice to support paths in addition to props and arrays
Something like
Operation | Object | Array | Path |
---|---|---|---|
get | prop | nth | path |
getOr | propOr | nthOr | pathOr |
set | setProp | setNth | setPath |
modify | modifyProp | modifyNth | modifyPath |
remove | removeProp | removeNth | removePath |
equals | propEquals | nthEquals | pathEquals |
satisfies | propSatisfies | nthSatisfies | pathSatisfies |
It's unclear to me if TypeScript ergonomics can be sufficiently good, but presumably the implementation would use either template literal types or tuples with recursive conditional types.