@fallow-cli/fallow-node
v2.102.0
Published
Native Node.js bindings for fallow, codebase intelligence for TypeScript and JavaScript. Finds unused code, duplication, circular dependencies, complexity hotspots, and architecture drift. Optional runtime intelligence layer (Fallow Runtime) adds producti
Downloads
10,953
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?)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, explain, and legacyEnvelope. legacyEnvelope mirrors CLI --legacy-envelope for consumers that need one migration cycle without the top-level JSON kind discriminator. diffFile accepts a path to a unified diff file; stdin diff sources are CLI-only.
Rejected promises throw a FallowNodeError with:
messageexitCode- optional
code - optional
help - optional
context
