Comments (1)
Your observation is correct. The syntax definition for ArrayExpression
nodes always includes an operands
value set to "<anonymous>"
. This seems intentional in order to get the Halstead metrics to work out correctly, however I think a better implementation might be to include the node's elements
array as the list of operands instead.
I intend to give this a bit more thought before pushing changes to improve this. I'm curious to get your feedback in the meantime. Did that answer your question? (please reopen the issue in not)
from escomplex.
Related Issues (20)
- `JSON.stringify(ast)` after `parseProject` causes overflow error on large project even if `debug` is a noop
- An in-range update of mocha is breaking the build 🚨
- do you have a plan to support es6? HOT 1
- Update README.md to match top-level API
- Publish latest version to npm HOT 1
- An in-range update of acorn is breaking the build 🚨 HOT 6
- Cyclomatic returns 1 for a file containing 1 if and 1 if-else inside a for loop
- Add the tests directory to .npmignore
- Remove the .gitattributes file
- Provide an alias for the "analyse" function in index.js
- Refactor all the syntax definitions into modules by language specification
- Update the top-level API to be more explicit
- Improve the contribution documentation
- Use the Javascript Standard Style HOT 1
- `nilHalsteadMetrics()` doesn't need to be a function in module.js HOT 4
- Update the CHANGELOG.md
- What is the meaning of settings.newmi HOT 1
- Error: Cannot find module 'esprima' HOT 1
- Call for maintainers HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from escomplex.