faga295 / napi-tokei Goto Github PK
View Code? Open in Web Editor NEWcount your code, blazing fast!
License: MIT License
count your code, blazing fast!
License: MIT License
message:
Error: Given napi value is not an array
at Object.<anonymous> (/Users/banma-1685/workspace/def-checker-source/test.js:9:13)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47 {
code: 'InvalidArg'
source:
const path = require('path');
const { tokei } = require('@faga/tokei');
// path need to be included, please use absolute path
const include = [path.resolve(__dirname, './tests/')];
console.log(tokei(include));
Like support '-t'
tokei -t JavaScript,TypeScript,TSX,JSX
and add total line ? like tokei json output
{
"Total": {
"blanks": 0,
"children": {
"TypeScript": [
{
"name": "/Users/banma-1685/workspace/def-checker-source/tests/index.ts",
"stats": { "blanks": 0, "blobs": {}, "code": 3, "comments": 9 }
}
]
},
"code": 3,
"comments": 9,
"inaccurate": false,
"reports": []
},
"TypeScript": {
"blanks": 0,
"children": {},
"code": 3,
"comments": 9,
"inaccurate": false,
"reports": [
{
"name": "/Users/banma-1685/workspace/def-checker-source/tests/index.ts",
"stats": { "blanks": 0, "blobs": {}, "code": 3, "comments": 9 }
}
]
}
}
maybe need scope?
/Users/banma-1685/workspace/def-checker-source/node_modules/_@[email protected]@@faga/tokei/index.js:226
throw loadError
^
Error: Cannot find module 'napi-tokei-darwin-arm64'
Require stack:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.