iter
iter copied to clipboard
Feature: searchKey
trafficstars
search() only finds the item you're searching for in the values of the iterable. e.g. search('foo', it) can only find 'foo', or nothing. If we want to know the key of the entry foo, there is currently no way to do this. searchKey('foo', it) would return the key pointing to the found 'foo'.
@nikic Would you accept this feature?
Sounds reasonable to me!