Archived
1
0

Add evaluation helpers (#33)

* Add evaluation helpers

* Make some helpers only available server-side

They don't make any sense on the client side.

* Fork the right thing
This commit is contained in:
Asher
2019-02-22 15:56:29 -06:00
committed by GitHub
parent de3fbd689f
commit 8b8bef015e
17 changed files with 306 additions and 247 deletions

View File

@ -13,7 +13,7 @@ describe("Evaluate", () => {
it("should compute from string", async () => {
const start = "ban\%\$\"``a,,,,asdasd";
const value = await client.evaluate((a) => {
const value = await client.evaluate((_helper, a) => {
return a;
}, start);
@ -21,7 +21,7 @@ describe("Evaluate", () => {
}, 100);
it("should compute from object", async () => {
const value = await client.evaluate((arg) => {
const value = await client.evaluate((_helper, arg) => {
return arg.bananas * 2;
}, { bananas: 1 });