2

Is there an API in Node.js, perhaps in user-land, that allows you to construct a CommonJS module programmatically, with or without using eval?

I would like my command line app to take the source code of a module as stdin and (re)construct the module in my program.

It would/could be used like:

cat foo.js | mynodeprogram
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

0 Answers0