This is the parser and evaluator used in the basho project. For documentation see https://www.github.com/jeswin/basho.
npm install basho-evalThis is the parser and evaluator used in the basho project. For documentation
see https://www.github.com/jeswin/basho.
It exports the PipelineError class and the evaluate() function.
Usage looks like this:
``javascriptPasses an object to a shell command
it(, async () => {``
const output = await evaluate(["{ name: 'kai' }", "-e", "echo ${x.name}"]);
(await toResult(output)).should.deepEqual({
mustPrint: true,
result: ["kai"]
});
});
See the
tests
for more examples.