P5.JS & jsPDF cant use 2.4.0 but 1.3.3 works

Seems like this is a common case for UMD packed files.

That is, they have a namespace object which wraps up their actual main constructor.

For the jsPDF library we have a namespace jspdf and a main constructor jsPDF inside jspdf.

I had to do the same for the ml-matrix library:

In its UMD format ml-matrix has a namespace mlMatrix and a constructor Matrix inside mlMatrix: