1

How do I parse the script tag or script URL I specified?

As a result of the parse operation, I will be able to obtain the script global variables and functions within the object. it should be able to show the default values of the variables.

Example

// Input

var a = 5;

function b(){}

var c = function(){
        var d=1;
};

Result

// Output
{
   "a":{
      "type":"variable",
      "value":5
   },
   "b":{
      "type":"function",
      "type":"void"
   },
   "c":{
      "type":"function",
      "type":"void",
      "scope":{
         "d":{
            "type":"variable",
            "value":1
         }
      }
   }
}

Is there a library that will work like the example above?

2
  • 1
    Just to clarify, do you want a Javascript library to parse Javascript code?
    – Alejandro
    Oct 20 '21 at 19:40
  • 1
    @Alejandro I want to know is what people do to parse javascript code. library etc...
    – a.gulcan
    Oct 20 '21 at 19:43
2

ITNOA

as you can see in JavaScript parser in JavaScript many library have this, for example

1
  • What is ITNOA ?
    – Lockszmith
    Oct 22 '21 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.