🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@testx/eval

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testx/eval

A very simple eval-in-context function.

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

@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");

FAQs

Package last updated on 13 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts