dy / subscript

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

Math.* support? #15

Closed colorcube closed 1 year ago

colorcube commented 1 year ago

Would be nice to have the typical Math functions available, or is this out of scope of this project?

colorcube commented 1 year ago

Ok I got it :-)

let fn = jstin('Math.ceil(price)');
console.log(fn({price: 12.5, Math}))

Adding a short example might be a good idea, though

dy commented 1 year ago

Thanks @colorcube! Done