Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

@testx/eval

This package exports a simple function, that allows you to eval code in context. The function has the signature evalInContext(context, codeToExecute).

Example

  const assert = require("assert");
  const evalInCtx = require("@testx/eval");
  const context = { some: "value" };
  const result = evalInCtx(context, "some");
  assert.equal(result, "value");

About

A very simple eval-in-context function.

Resources

Releases

No releases published

Packages

No packages published