F
F
frontendo2018-02-24 16:52:48
JavaScript
frontendo, 2018-02-24 16:52:48

How to get list of nodejs module variables?

For example, there is a file

const a = 3;
const b = 4;
const c = 5;

...

is it possible to somehow get the names and values ​​of the variables a, b, c as an object from some global variables, for example, something like
global.module.vars 
{
  a: 3,
  b: 4,
  c: 5
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question