evaluator
v1.0.2
Published
Simple evaluator of files with JavaScript code.
Downloads
12
Readme
evaluator
Simplest module for evaluating local files with JavaScript code.
How to install this module?
To install this module use following command at root path of your module:
npm install evaluator --save
Usage
This module exports function which waits only one argument on input: string with path to target file.
Function don't returns anything: them evaluate file content and return undefined
.
Example:
/**
* Content of file example.js: "console.log(1);"
*/
var evaluator;
evaluator = require('evaluator');
evaluator('./example.js');
// Number 1 was written into log.