How to use math.js in Server Script?

Hi there! Trying to use a math.js library within a Server Script workflow (namely a Weighed Random function).

Any ideas how to include the library? I’ve tried require and import , but it doesn’t seem to work… Any ideas?


Thank you

You can’t do that in Toolbox. If you’re comfortable writing code like this, just use the Plugin Builder to make a Server Side Action (these are very very simple plugins to build).

Thank you! I’ll give it a shot.