Catalog npm
Back to packageRELEASE DETAILS

0.1.1

npm

3h-count

A utility program that displays some information about the given file(s).

3hcountdirectoryfilefolderlistlsprojecttree
Published26 Aug 2023
Direct dependencies2
Transitive dependenciesNot calculated

README

Current package documentation

3h-count

A utility program that displays some information about the given file(s).

Example

$ 3h-count src/**/*.*
[summary]
fileCount: 4
totalLineCount: 228
emptyLineCount: 30
nonemptyLineCount: 198

CLI Usage

$ 3h-count --help
A utility program that displays some information about the given file(s).

Usage:
  3h-count <action> [options] -- [globs...]

Actions:
  <globs...>                    File(s) to include.

Options:
  --help, -h                    Show help info.
  --mode, -m <file|project>     Display mode. (default: project)
  --file, -f                    Shortcut for "--mode file".
  --project, -p                 Shortcut for "--mode project".
  --root, -r <path>             The root directory in which to search.
  --include-dot-files, -d       Include files whose name begin with a period.
  --no-summary, -S              Omit summary section in file mode.
  -- [globs...]                 Additional file(s) to include.

Progammatical Usage

export interface CountFileOptions {
    filePath: string;
    /**
     * @default {false}
     */
    noDisplay?: boolean;
}

export interface CountFileResult {
    totalLineCount: number;
    emptyLineCount: number;
    nonemptyLineCount: number;
}

export declare const countFile: (options: CountFileOptions) => Promise<CountFileResult>;

export type CountGlobMode = 'file' | 'project';

export interface CountGlobOptions {
    pattern: string[] | string;
    /**
     * @default {'project'}
     */
    mode?: CountGlobMode;
    cwd?: string;
    /**
     * @default {false}
     */
    noDisplay?: boolean;
    /**
     * @default {false}
     */
    noSummary?: boolean;
    /**
     * @default {false}
     */
    includeDotFiles?: boolean;
}

export interface CountGlobResult {
    results: CountFileResult[];
    fileCount: number;
    totalLineCount: number;
    emptyLineCount: number;
    nonemptyLineCount: number;
}

export declare const countGlob: (options: CountGlobOptions) => Promise<CountGlobResult>;

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
3h-cli
Environment
{
  "local_name": "3h-cli",
  "alias": false,
  "peer_metadata": null
}
^4.0.0runtime
fast-glob
Environment
{
  "local_name": "fast-glob",
  "alias": false,
  "peer_metadata": null
}
^3.3.1runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "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"
    }
  ]
}

Repository

PENDING
huang2002/3h-count

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:43 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:f6ca6f285a69a5b81d9c65e02b68cbf7ddcc2535edee702c8be1178b2b8561f4

Other collected versions

0.1.028 JulView all collected versions →