UNPKG

node-sloc

Version:

A small tool for counting SLOC.

18 lines (17 loc) 928 B
import { Options, SLOCResult } from './types'; /** * @typedef {Object} Options * @property {string} path The path to walk. * @property {Array} extensions File extensions to look for. * @property {Array} [ignorePaths] A list of directories to ignore. * @property {boolean} [ignoreDefault] Whether or not to ignore the default extensions provided. * @param {function} [logger] Outputs extra information to this function if specified. */ /** * Async walks and counts SLOC in files in the given path. * @param {Options} options Options passed to the function. * @return {Promise} Resolves to an object containing SLOC and filepaths. * Returns null if no files matched the given path. */ declare const walkAndCount: (options: Options) => Promise<SLOCResult | null>; export { walkAndCount };