I want to check parameters of a function to be in a range with babel. I mean I want to change the following code:
function(arg1, arg2)
{
body of function
}
to this code:
function checkRange(argument)
{
some checking
}
function(arg1, arg2)
{
checkRange(arg1);
checkRange(arg2);
body of function
}
how can I do this with Babel? I read this tutorial: https://lihautan.com/step-by-step-guide-for-writing-a-babel-transformation/ and I also read a number of examples in https://github.com/babel/babel/tree/master/packages and more and more. but I'm very beginner in Babel
you can use inner function like this :