Skip to content

v1.1.0

Compare
Choose a tag to compare
@evanightly evanightly released this 07 Feb 08:35
· 23 commits to main since this release
2eef720

Dynamic Module Importer

Allows you to import multiple modules into your node script


Tested with:

  • mongoose
  • other file that contains default exported functions

Installation

Install from the command line:
npm install @evanhendersonrichtbyte/dynamic-module-importer@1.1.0
Install via package.json:
"@evanhendersonrichtbyte/dynamic-module-importer": "1.1.0"

How to use

include functions needs 2 parameters (files, includedFn)

  • files : array of strings = your files (containing array of filenames)
  • includedFn : array of strings = storing list of imported functions

Functions

  • functionList = return list of imported functions
  • fileList = return list of imported files