npm.io
1.0.2 • Published 11 years ago

evaluator

Licence
MIT
Version
1.0.2
Deps
0
Vulns
0
Weekly
0

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.

Keywords