Giter Club home page Giter Club logo

napi-tokei's Introduction

๐Ÿ‘‹ Hi there

  • ๐Ÿ… I'm faga, a front-end engineer, undergraduate @xdu

  • ๐Ÿš€ Ask me about Vue, React,Typescript, Rust, Vite

  • ๐Ÿ–ฅ๏ธ Interned at Bytedance and Alibaba Taobao.

  • ๐Ÿ“ซ How to reach me: [email protected]

napi-tokei's People

Contributors

faga295 avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

napi-tokei's Issues

Are there any plans to support more options?

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 }
      }
    ]
  }
}

Given napi value is not an array

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));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.