Adding libraries and debugging javascript

Advanced Renamer forum
#1 : 24/09-18 18:10
Joshua Ball
Joshua Ball
Posts: 1
First question, is there any support for adding libraries (like moment js) to the scripting feature? I can get the minified version and stick it in the pre batch script, however, the window/editor doesn't support long lines. And when I add moment-timezeone, well, there is lots of data. ;-)

I don't suppose this is node, and you have npm? ;-) Or even a script reference tag? Happy to help you if you want?

Second question, is there a way to get console.log statements or any other way to debug scripts? Dump variables, etc... Even to a file? I see the info in the error field, but would love a console.

Excellent product! Thank you!

24/09-18 18:10
#2 : 25/09-18 10:04
Kim Jensen
Kim Jensen
Posts: 799
Reply to #1:
The script engine used is SpiderMonkey. And to be honest, it is some iterations old. The script engine is meant to be simple, which is why importing external scripts s not supported. I would like to update the script engine, but it is not as easy as it might sound. Also, the current one is quite small, which I like.

Version 3.84 is due release within days and includes a way to log to a console with console.log().

25/09-18 10:04