mavoweb / vastly

Everything you need to support a custom formula language

Home Page:https://vastly.mavo.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Function to easily switch from function call to method call?

LeaVerou opened this issue · comments

A common type of manipulation is to transform fn(foo, bar) to foo.fn(bar) and vice versa. We'll also need it in mavoweb/mavo#1009

Would it make sense for vastly to expose a function that helps with this or should this be a Mavo util function?
Right now we don't have any modules that only work with specific node types. Do we want this to be a vastly design principle or are we fine with having more specialized helpers too?

It's roughly on the order of specificity of the other function we're adding in #32, so I'd be fine with including it, or we can stick it in Mavo

It's roughly on the order of specificity of the other function we're adding in #32, so I'd be fine with including it, or we can stick it in Mavo

I'm not so sure; #32 applies to every node, whereas this has no meaning outside of function calls.

Let's just do it in Mavo 😄