I want to use this jquery function inside my jaggery file:
$.inArray(value, array)
What is the most efficient way of doing it?
Jquery is already imported in the file using a <script>
tag. I think using require()
function to again get jquery would be inefficient.
You cannot use jQuery in JaggeryJs. Jaggery is designed to run at the server side(Internally uses Rhino Engine). Unless there's a jQuery library for server side scripting you won't be able to do this.
As an alternative you could do something like this;