find-in-files icon indicating copy to clipboard operation
find-in-files copied to clipboard

Return format is not an object

Open YglesEyes opened this issue 5 years ago • 3 comments

The return value is not an Object but it's an Array

YglesEyes avatar Jul 18 '19 16:07 YglesEyes

Thus it is impossible to loop on results with a "for of" loop.

MonsieurNerd avatar Aug 01 '19 20:08 MonsieurNerd

You can use Object.keys(), to get the keys and iterate that way. But yes this problem is a stupid one.

zajrik avatar Aug 02 '19 15:08 zajrik

In the github repo it IS an object https://github.com/kaesetoast/find-in-files/blob/4dea664eb6c9849d6eaf80977f72644f551f2d20/index.js#L70 but in the version published in npm , it is (still) an array. @kaesetoast , kindly publish your last version to npm, please, thanks in advance.

alvarobyrne avatar Oct 15 '22 07:10 alvarobyrne