dy / subscript

Fast and tiny expression evaluator with minimal syntax.
ISC License
105 stars 4 forks source link

is async supported? #13

Closed jonathanstanley closed 1 year ago

jonathanstanley commented 1 year ago

nice work!

I was wondering if there is an approach that would handle async?

let fn = createFn('a + b(3)')
fn({ a: 2,b:x=>Promise.resolve(x)}) // 5

also, it isn't clear why github repo uses createFn and npm uses script in the first example

dy commented 1 year ago

Ah, I updated readme in github after publishing to npm. Take github as the latest doc. As for async - it depends on what kind of async you want.

jonathanstanley commented 1 year ago

thanks!