node-tokei
import tokei from 'node-tokei'
const LocStats = await tokei('../some/path');
A program that allows you to count your code, quickly. Node.js wrapper for Tokei library http://tokei.rs
TypeScript
import tokei from 'node-tokei'
const LocStats = await tokei('../some/path');