iiris icon indicating copy to clipboard operation
iiris copied to clipboard

Support for paths

Open sluukkonen opened this issue 3 years ago • 0 comments

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.

sluukkonen avatar Apr 07 '21 15:04 sluukkonen