From 1efe42e89c281f4ba8c0a254b31c2816fb5eecae Mon Sep 17 00:00:00 2001 From: Jonas Amundsen Date: Tue, 26 May 2020 16:07:44 +0200 Subject: [PATCH] feat: log yielded elements (#41) Co-authored-by: Gleb Bahmutov --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index f2214ac..10664f5 100644 --- a/src/index.js +++ b/src/index.js @@ -101,6 +101,7 @@ const xpath = (subject, selector, options = {}) => { log.consoleProps = () => { return { 'XPath': selector, + 'result': nodes.length === 1 ? nodes[0] : nodes } }