DEV Community

✨Nimmo✨
✨Nimmo✨

Posted on

1

Find ES6 features in any JS code

I came across a problem where I had to find the ES6 features used by any javascript project and other data regarding their use. When I reached out to stackoverflow, I could find only one relevant post which asks you to use linters like jshint/jshint or compilers like babel. Jslint didn't seem to report anything specific to ES6 and Babel converts all the ES6+ features to ES5 but doesn't report anything regarding which constructs were used or how many times they were used. However, Jshint reported all ES6 features used in the code along with some metadata. And, to suit my needs, I ended up writing a python script that calls Jshint on all JS files in a project and presents the features used in the project and the number of times they were used across all files. You can find the code here : jsHintRunner

Feel free to report a bug/issue or open a PR if you have improvement ideas.

Hope this helps someone at some point.

Tiugo image

Fast, Lean, and Fully Extensible

CKEditor 5 is built for developers who value flexibility and speed. Pick the features that matter, drop the ones that don’t and enjoy a high-performance WYSIWYG that fits into your workflow

Start now

Top comments (0)

ACI image

ACI.dev: The Only MCP Server Your AI Agents Need

ACI.dev’s open-source tool-use platform and Unified MCP Server turns 600+ functions into two simple MCP tools on one server—search and execute. Comes with multi-tenant auth and natural-language permission scopes. 100% open-source under Apache 2.0.

Star our GitHub!

Real Talk: Realistic Voice AI with ElevenLabs

ElevenLabs is joining us to talk about how to power your applications with lifelike speech. Learn how to use ElevenLabs to enhance user interactions, build low-latency conversational agents, and tap into one of the leading AI voice generators.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️