{"_id":"3h-count","_rev":"1-298cd988eb83d228aabe3edb1db873cd","name":"3h-count","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"3h-count","version":"0.1.0","description":"A utility program that displays some information about the given file(s).","type":"module","main":"src/index.js","bin":{"3h-count":"src/cli.js"},"scripts":{"test:project":"node src/cli src/**/*.*","test:file":"node src/cli -f -r src -- **/*.*","test:help":"node src/cli --help"},"repository":{"type":"git","url":"git+https://github.com/huang2002/3h-count.git"},"keywords":["count","list","ls","file","folder","directory","tree","project","3h"],"author":{"name":"3h"},"license":"ISC","bugs":{"url":"https://github.com/huang2002/3h-count/issues"},"homepage":"https://github.com/huang2002/3h-count#readme","dependencies":{"3h-cli":"^4.0.0","fast-glob":"^3.3.1"},"gitHead":"7e4d80938238d01c05090ee8db7e606934ed9c70","_id":"3h-count@0.1.0","_nodeVersion":"18.17.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-536iyeGgqutWwOgXNTF++doJwNRzGp2ILYCyUEAVPZv3IEeRVFiMKqrW2NH0qagZEscVT/GmoChhBlc8TXZqYg==","shasum":"785b756f1da08f99382328d2102670ec867bb526","tarball":"https://registry.npmjs.org/3h-count/-/3h-count-0.1.0.tgz","fileCount":8,"unpackedSize":9881,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrN2b9xo/nIF0leBCgo6kZmWWeiuIq42p6ibnEILB/pAiBvRBbwu+JD9UssLDvOfgKEmUz5kim7m2loIwke9dPN3w=="}]},"_npmUser":{"name":"3h","email":"1340545944@qq.com"},"directories":{},"maintainers":[{"name":"3h","email":"1340545944@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/3h-count_0.1.0_1690532710644_0.18086276924383182"},"_hasShrinkwrap":false},"0.1.1":{"name":"3h-count","version":"0.1.1","description":"A utility program that displays some information about the given file(s).","type":"module","main":"src/index.js","bin":{"3h-count":"src/cli.js"},"scripts":{"test:project":"node src/cli src/**/*.*","test:file":"node src/cli -f -r src -- **/*.*","test:help":"node src/cli --help"},"repository":{"type":"git","url":"git+https://github.com/huang2002/3h-count.git"},"keywords":["count","list","ls","file","folder","directory","tree","project","3h"],"author":{"name":"3h"},"license":"ISC","bugs":{"url":"https://github.com/huang2002/3h-count/issues"},"homepage":"https://github.com/huang2002/3h-count#readme","dependencies":{"3h-cli":"^4.0.0","fast-glob":"^3.3.1"},"gitHead":"d8789b02269b10d79c23681ff6dbbc488965b62d","_id":"3h-count@0.1.1","_nodeVersion":"18.17.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-TNlFHFABFtzohOaCSXfnBwDSB2+9w3FuVkZqtD14BYaQSZ2WC4TsA3tpzMNZg4Ob8SljP/aOdfRMOslojAvjNQ==","shasum":"66c38231592853718b01edd256f59985acaed7bb","tarball":"https://registry.npmjs.org/3h-count/-/3h-count-0.1.1.tgz","fileCount":8,"unpackedSize":9967,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIkfD6Xfr8VYT2uvJ3SAQrlrunz8EX3XrzLf1fAaWmvwIhANINxalU7xKaEK0RR5hXozBUwJN/pPCMAgn+Tl8trUyv"}]},"_npmUser":{"name":"3h","email":"1340545944@qq.com"},"directories":{},"maintainers":[{"name":"3h","email":"1340545944@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/3h-count_0.1.1_1693009208303_0.8188809167181366"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-28T08:25:10.644Z","0.1.0":"2023-07-28T08:25:10.868Z","modified":"2023-08-26T00:20:08.702Z","0.1.1":"2023-08-26T00:20:08.513Z"},"maintainers":[{"name":"3h","email":"1340545944@qq.com"}],"description":"A utility program that displays some information about the given file(s).","homepage":"https://github.com/huang2002/3h-count#readme","keywords":["count","list","ls","file","folder","directory","tree","project","3h"],"repository":{"type":"git","url":"git+https://github.com/huang2002/3h-count.git"},"author":{"name":"3h"},"bugs":{"url":"https://github.com/huang2002/3h-count/issues"},"license":"ISC","readme":"# 3h-count\r\n\r\n> A utility program that displays some information about the given file(s).\r\n\r\n## Links\r\n\r\n- [Changelog](./CHANGELOG.md)\r\n- [License (ISC)](./LICENSE)\r\n\r\n## Example\r\n\r\n```bash\r\n$ 3h-count src/**/*.*\r\n[summary]\r\nfileCount: 4\r\ntotalLineCount: 228\r\nemptyLineCount: 30\r\nnonemptyLineCount: 198\r\n```\r\n\r\n## CLI Usage\r\n\r\n```bash\r\n$ 3h-count --help\r\nA utility program that displays some information about the given file(s).\r\n\r\nUsage:\r\n  3h-count <action> [options] -- [globs...]\r\n\r\nActions:\r\n  <globs...>                    File(s) to include.\r\n\r\nOptions:\r\n  --help, -h                    Show help info.\r\n  --mode, -m <file|project>     Display mode. (default: project)\r\n  --file, -f                    Shortcut for \"--mode file\".\r\n  --project, -p                 Shortcut for \"--mode project\".\r\n  --root, -r <path>             The root directory in which to search.\r\n  --include-dot-files, -d       Include files whose name begin with a period.\r\n  --no-summary, -S              Omit summary section in file mode.\r\n  -- [globs...]                 Additional file(s) to include.\r\n```\r\n\r\n## Progammatical Usage\r\n\r\n```typescript\r\nexport interface CountFileOptions {\r\n    filePath: string;\r\n    /**\r\n     * @default {false}\r\n     */\r\n    noDisplay?: boolean;\r\n}\r\n\r\nexport interface CountFileResult {\r\n    totalLineCount: number;\r\n    emptyLineCount: number;\r\n    nonemptyLineCount: number;\r\n}\r\n\r\nexport declare const countFile: (options: CountFileOptions) => Promise<CountFileResult>;\r\n\r\nexport type CountGlobMode = 'file' | 'project';\r\n\r\nexport interface CountGlobOptions {\r\n    pattern: string[] | string;\r\n    /**\r\n     * @default {'project'}\r\n     */\r\n    mode?: CountGlobMode;\r\n    cwd?: string;\r\n    /**\r\n     * @default {false}\r\n     */\r\n    noDisplay?: boolean;\r\n    /**\r\n     * @default {false}\r\n     */\r\n    noSummary?: boolean;\r\n    /**\r\n     * @default {false}\r\n     */\r\n    includeDotFiles?: boolean;\r\n}\r\n\r\nexport interface CountGlobResult {\r\n    results: CountFileResult[];\r\n    fileCount: number;\r\n    totalLineCount: number;\r\n    emptyLineCount: number;\r\n    nonemptyLineCount: number;\r\n}\r\n\r\nexport declare const countGlob: (options: CountGlobOptions) => Promise<CountGlobResult>;\r\n```\r\n","readmeFilename":"README.md"}