@fallow-cli/fallow-node
v3.14.0
Published
Native Node.js bindings for fallow, codebase intelligence for TypeScript and JavaScript. Finds unused code, duplication, circular dependencies, complexity hotspots, architecture drift, and design-system styling drift. Optional runtime intelligence layer (
Maintainers
Readme
@fallow-cli/fallow-node
Native Node.js bindings for fallow’s main analyses.
Install
npm install @fallow-cli/fallow-node # or: pnpm/yarn/bun add @fallow-cli/fallow-nodeAPI
detectDeadCode(options?)detectCircularDependencies(options?)detectBoundaryViolations(options?)detectDuplication(options?)detectFeatureFlags(options?)computeComplexity(options?)computeHealth(options?)
All functions are async and return the same JSON-shaped report contracts that the CLI emits for --format json.
Enum-like option values use lowercase CLI-style strings such as "mild", "cyclomatic", "handle", and "low".
Shared options mirror analysis-affecting CLI globals, including root, configPath, noCache, threads, diffFile, production, changedSince, workspace, changedWorkspaces, and explain. Object-shaped JSON roots always carry the top-level kind discriminator; consumers should branch on kind. diffFile accepts a path to a unified diff file; stdin diff sources are CLI-only.
The rich public declarations live in types/index.d.ts. The package-level
index.d.ts is a generated entry point that re-exports that canonical source.
This keeps the package root stable when NAPI-RS regenerates its temporary
declarations during a native build.
Rejected promises throw a FallowNodeError with:
messageexitCode- optional
code - optional
help - optional
context
