importeer

0.0.0-pre0 • Public • Published

Importeer

A CJS dynamic Import for NodeJS Only at present (if you are not a user of requrejs at last)

Why?

Because i wanted to code like i would use Import but using only require

  • Dynamic CJS module loading inside NodeJS with Modules that get garbage collected after execution

Usage

example async await

const load = require('importeer')

async function test(dependencys) {
  const [ http, child_process] = await dependencys;
  const { exec } = child_process;
  console.log(exec);
  // After that log all is removed from ram!!!!!
}

test(Importeer(['http', 'child_process']));

example promise

const load = require('importeer)

function test(dependencys) {
  const [ http, child_process] = dependencys;
  const { exec } = child_process;
  console.log(exec);
  // After that log all is removed from ram!!!!!
}

Importeer(['http', 'child_process']).then(test})

Package Sidebar

Install

npm i importeer

Weekly Downloads

0

Version

0.0.0-pre0

License

Apache-2.0

Unpacked Size

2.03 kB

Total Files

3

Last publish

Collaborators

  • frank-dspeed