Global function
-
Hello,
I have several functions that I use in different scripts and I would like to gather them in one file and be able to import them into my other scripts. That way if I need to modify a function I only have to do it in one place. Is that possible ?
Thank you in advance.
-
That is task for the jsreport asset.
In jsreport script, you can require the function from asset like this
https://jsreport.net/learn/assets#require-asset
-
Thank you for your response.
Do you have an example of an asset? I'm having a bit of trouble creating one and importing it into a script to use its functions.
-
Please check here
https://playground.jsreport.net/w/anon/QLkuZ0EP