# code-count

> A CLI tool to count code lines and characters.

Latest version **1.5.1** (published 2020-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install code-count
pnpm add code-count
yarn add code-count
bun add code-count
```

Provides the command `code-count`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2020-07-06 |
| First published | 2017-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | York Yao |
| Maintainers | plantain_00 |

## Links

- npm: https://www.npmjs.com/package/code-count
- Repository: https://github.com/plantain-00/code-count
- Homepage: https://github.com/plantain-00/code-count#readme
- Issues: https://github.com/plantain-00/code-count/issues
- npm.io page: https://npm.io/package/code-count

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) 1 || 2
- [minimist](https://npm.io/package/minimist.md) 1

## Recent versions

- 1.5.1 (latest) — 2020-07-06
- 1.5.0 — 2020-06-20
- 1.4.1 — 2020-06-04
- 1.4.0 — 2020-06-03
- 1.3.1 — 2020-06-03
- 1.3.0 — 2018-05-28
- 1.2.0 — 2018-05-28
- 1.1.1 — 2018-05-15
- 1.1.0 — 2018-01-16
- 1.0.4 — 2017-08-31
- 1.0.3 — 2017-07-13
- 1.0.2 — 2017-03-25
- 1.0.1 — 2017-03-25
- 1.0.0 — 2017-03-24

## README

# code-count

[![Dependency Status](https://david-dm.org/plantain-00/code-count.svg)](https://david-dm.org/plantain-00/code-count)
[![devDependency Status](https://david-dm.org/plantain-00/code-count/dev-status.svg)](https://david-dm.org/plantain-00/code-count#info=devDependencies)
[![Build Status: Linux](https://travis-ci.org/plantain-00/code-count.svg?branch=master)](https://travis-ci.org/plantain-00/code-count)
[![Build Status: Windows](https://ci.appveyor.com/api/projects/status/github/plantain-00/code-count?branch=master&svg=true)](https://ci.appveyor.com/project/plantain-00/code-count/branch/master)
[![npm version](https://badge.fury.io/js/code-count.svg)](https://badge.fury.io/js/code-count)
[![Downloads](https://img.shields.io/npm/dm/code-count.svg)](https://www.npmjs.com/package/code-count)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fplantain-00%2Fcode-count%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/code-count)

A CLI tool to count code lines and characters.

## install

`yarn global add code-count`

## usage

`code-count . -i .ts -e node_modules,.git`

or `code-count src/index.ts`

## options

key | description
--- | ---
-i,--include | file extension name, eg: ".ts,.html", repeatable
-e,--exclude | directories, eg: "node_modules,.git", repeatable
--debug | debug mode
-h,--help | Print this message.
-v,--version | Print the version

## api

```ts
import { count } from 'code-count'

count('.', {
  includedFileExtensionNames: [ '.ts' ],
  excludedDirectories: [ 'node_modules', '.git' ]
})
```

---
_Source: https://npm.io/package/code-count · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
