Releases: edvinh/node-sloc
Releases · edvinh/node-sloc
v0.2
Release v0.2.0
This release includes a few improvements and breaking changes, the most notable ones being:
- Full TypeScript support
- A build system for compiling, linting, and formatting TS
- Hooks for running tests and linting before commit & push
- Support for both ES Modules & CommonJS
- Glob support for
ignorePaths
- New
sloc
alias for runningnode-sloc
as a CLI
Breaking changes
- Dropped support for node <8.
sloc(opts)
now returns null if no files matched the specified path. The previous behavior was to return an object with an emptypath
array and an emptysloc
object:{path: [], sloc: {}}
.- The returned object from
sloc(opts)
has no nesting anymore. It now returns aSLOCResult
containing 6 fields:
{
loc: number;
sloc: number;
blank: number;
comments: number;
paths: string[];
files: number;
}