xpath.js icon indicating copy to clipboard operation
xpath.js copied to clipboard

Document the return value of `select()`

Open markstos opened this issue 9 years ago • 2 comments

Some examples of calling select() are shown, but there is no formal documentation of the object returned. Exactly what attributes and methods does it have? Is it always an array?

markstos avatar Aug 07 '16 21:08 markstos

Also, the return value when nothing is matches should be documented. Does it return an empty string? null? undefined? throw an error? Their is a lack of docs or examples for this case.

markstos avatar Jan 20 '20 21:01 markstos

I checked that there are currently also no tests for a failed match, either.

markstos avatar Jan 20 '20 21:01 markstos