evalbuilder

0.0.1 • Public • Published

EvalBuilder

Eval string builder for javascript. To be used with libraries such as :

node-webworker-threads

or any other usecase that requires you to input the code as a string.

Build Status bitHound Dependencies bitHound Overall Score issues stars license

Installation

npm install evalbuilder --save

Usage:

const evalbuilder = require("evalbuilder")
 
console.log(evalbuilder.max(1,2)); // 'max(1,2)'
console.log(evalbuilder.sum([1,2,3])); // 'max([1,2,3])'
console.log(evalbuilder.sort({id:1,str:'hey'},{id:2,str:'hi'})) // 'sort({"id":1,"str":"hey"},{"id":2,"str":"hi"})'
console.log(evalbuilder.anyfunctioname('hello!')) //anyfunctioname("hello")
 
 

Implementation

Utilises javascript es6 Proxy.

Package Sidebar

Install

npm i evalbuilder

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

2.9 kB

Total Files

5

Last publish

Collaborators

  • jodevsa