Coder Social home page Coder Social logo

Support for ECMAScript about nodejsscan HOT 6 CLOSED

ajinabraham avatar ajinabraham commented on July 29, 2024
Support for ECMAScript

from nodejsscan.

Comments (6)

ajinabraham avatar ajinabraham commented on July 29, 2024

Are these scripts intended to run at server side using Node.js or at client side via browsers?

from nodejsscan.

mihir7293 avatar mihir7293 commented on July 29, 2024

ECMAScripts are just coding standards for javascript that is supported by Javascript Engine. If used in Node.js it will run on server side.

Nodejs ECMA : https://nodejs.org/en/docs/es6/

Below link is for client side but similar code can be used on server side.
https://www.w3schools.com/js/js_es6.asp

from nodejsscan.

ajinabraham avatar ajinabraham commented on July 29, 2024

NodeJsScan by design will try to avoid scanning JavaScript files meant for client side to avoid false positives.
I think, import has to be supported. But the big downside is, now it's difficult to distinguish between server side and client side JS.

from nodejsscan.

mihir7293 avatar mihir7293 commented on July 29, 2024

I will check if we can differentiate by some means.

from nodejsscan.

skeggse avatar skeggse commented on July 29, 2024

My 2ยข is that users of NodeJsScan tend to know the anatomy of their project well, and are in a good position to configure something to explicitly delineate which files are Node files and which are browser-targeted. We have some files that are isomorphic and run in both contexts, which will likely make any heuristic-based approach inaccurate. I'd be happy to configure the tool either via a config file or a CLI flag.

Another option might be to start at the entry-point for a project and traverse the included modules by looking at import and require statements, expanding the included files and assuming they're all Node files.

from nodejsscan.

ajinabraham avatar ajinabraham commented on July 29, 2024

We don't distinguish between client side/server side javascript now.
Take a look at our new CLI tool: https://github.com/ajinabraham/njsscan

from nodejsscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.