From 844c533ec3497c4175281e51b88a47222fabf335 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 27 Jan 2021 15:26:17 -0600 Subject: [PATCH] docs ~ change examples to show properties and methods of project object --- eg/show-xdg-paths-detailed.js | 2 +- eg/show-xdg-paths.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eg/show-xdg-paths-detailed.js b/eg/show-xdg-paths-detailed.js index 261c524..617db9d 100644 --- a/eg/show-xdg-paths-detailed.js +++ b/eg/show-xdg-paths-detailed.js @@ -9,7 +9,7 @@ console.log('xdg.name:', xdg.name); console.log({ xdg }); Object.keys(xdg).forEach((key) => { - console.log(key, '=', xdg[key]()); + console.log(key, '=', typeof xdg[key] === 'function' ? xdg[key]() : xdg[key]); }); /* eslint-enable no-console , security/detect-object-injection, security-node/detect-crlf */ diff --git a/eg/show-xdg-paths.js b/eg/show-xdg-paths.js index f21a9db..e989c1c 100644 --- a/eg/show-xdg-paths.js +++ b/eg/show-xdg-paths.js @@ -6,7 +6,7 @@ const xdg = require('../dist/cjs/index.js'); /* eslint-disable no-console , security/detect-object-injection, security-node/detect-crlf */ Object.keys(xdg).forEach((key) => { - console.log(key, '=', xdg[key]()); + console.log(key, '=', typeof xdg[key] === 'function' ? xdg[key]() : xdg[key]); }); /* eslint-enable no-console , security/detect-object-injection, security-node/detect-crlf */