This PR implements indices and copies jq's derivative implementations of index and rindex according to the spec here. Note that jq has TODO's related to performance on said implementations, so perhaps you'd want to close this PR and wait for a performant version of these filters.
~Also, the behaviour of jq's indices varies slightly when dealing with strings. I reported/asked about it here: https://github.com/jqlang/jq/issues/3030~ (my mistake; jq solved the issue in 1.7)
Thanks a lot, this is some great work! Just for future reference, in tests, it is preferable to use yields! instead of gives, because it allows for much more compact tests with names.
This PR implements
indices
and copies jq's derivative implementations ofindex
andrindex
according to the spec here. Note that jq has TODO's related to performance on said implementations, so perhaps you'd want to close this PR and wait for a performant version of these filters.~Also, the behaviour of jq's
indices
varies slightly when dealing with strings. I reported/asked about it here: https://github.com/jqlang/jq/issues/3030~ (my mistake; jq solved the issue in 1.7)Closes #154