Count Lines of Code Library do Node.JS
The node-cloc library counts the number of lines of code for the given folder. This library is based on the fatastic cloc tool.
$ npm i node-cloc
const cloc = require('node-cloc')
cloc('/my/folder').then((res) => console.log(res), (err) => console.log(err))