From 7787350431efa0f215121772b0978a76a91b43c7 Mon Sep 17 00:00:00 2001 From: zzbozheng Date: Mon, 7 Jan 2019 00:25:07 +0800 Subject: [PATCH] feat: exports some vars. --- jsloc.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/jsloc.js b/jsloc.js index 93b5294..9003833 100755 --- a/jsloc.js +++ b/jsloc.js @@ -123,3 +123,23 @@ rl.write(`\n functions: ${totalFunctions} | comments: ${totalComments}`); rl.write("\n________________________________________________________________"); rl.write("\n"); rl.close(); + +module.exports = { + allFiles, + totalLines, + totalJavaScriptLines, + totalOtherLines, + totalVariables, + totalLets, + totalConsts, + totalIfs, + totalFunctions, + totalComments, + allFilesCount, + allJavaScriptFilesCount, + allOtherFilesCount, + jsFilesCount, + jsxFilesCount, + tsFilesCount, + tsxFilesCount +}