@abdevs/js-file-executor
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

JS File Executor

A lib that can execute all the Javascript files in the specified directory.

Support

Join our Discord Server for any support related queries.

Installing

npm i @abdevs/js-file-executor

You can add this code in your index.js.

const fileExecutor = require('@abdevs/js-file-executor');

const arg1 = 'Hello';
const arg2 = 'World';

fileExecutor('DIRECTORY-PATH', arg1, arg2);

Then add any amount of Javascript in the specified directory with a exported function.

file.js

module.exports = (arg1, arg2) => {
  console.log(`${arg1} ${arg2}`); //Output on execute: "Hello World"
};

You can pass as many arguments as you want.

Terms and Conditions

This Repository only available for code look up and personal use.

You are not allowed to steal the code from this repository.

Dependents (0)

Package Sidebar

Install

npm i @abdevs/js-file-executor

Weekly Downloads

1

Version

2.0.3

License

ISC

Unpacked Size

14.2 kB

Total Files

20

Last publish

Collaborators

  • whovanilla
  • ashuguptagamer