Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
circular-dependency-analyzer
Advanced tools
Detect modules with circular dependencies in files.
npm install circular-dependency-analyzer
// or
yarn install circular-dependency-analyzer
Parameters | Type | Description |
---|---|---|
dir | string | dir is a directory based on process.cwd() |
alias | object | alias object's value is a directory or file based on process.cwd() too |
Result | Type | Description |
---|---|---|
stack | object | It's an object with key(filepath ). value(required filepath array), filepath is based on process.cwd() , besides, its /index and extname will be removed |
Parameters | Type | Description |
---|---|---|
dir | string | dir is a directory based on process.cwd() |
alias | object | alias object's value is a directory or file based on process.cwd() too |
Result | Type | Description |
---|---|---|
circularDependencies | 2 d array | It's a two-dimensional array, each item array represents a circular dependency |
import { getFileRequiresStack, getCircularReferences } from 'circular-dependency-analyzer'
getFileRequiresStack('src')
getCircularReferences('src')
getFileRequiresStack('src', {
fs: 'src/fs',
})
getCircularReferences('src', {
fs: 'src/fs',
})
More examples you can find in tests
dir.
FAQs
Detect modules with circular dependencies in files
We found that circular-dependency-analyzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.