Standalone libphonenumber-js as public script

I am trying to use standalone version of libphonenumber-js (GitHub - catamphetamine/libphonenumber-js: A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript) as corvid public script,
but there is a problem with this code:

! function (d, t) {
“object” == typeof exports && “object” == typeof module ? module.exports = t() : “function” == typeof define && define.amd ? define(“libphonenumber”, , t) : “object” == typeof exports ? exports.libphonenumber = t() : d.libphonenumber = t()
}
(window, function () {

Some errors: module is not defined, window is not defined

Any hint how to solve it?

if you are wanting to use nodeJS within Wix, then you should be using it through Wix Node Manager.
https://support.wix.com/en/article/corvid-managing-external-code-libraries-with-the-package-manager

However, if it is not on the Manager’s list or on this requested node list, then it is not supported through Wix Node Manager as of yet, although you could put in a request for it.
https://www.wix.com/corvid/npm-modules

If you are wanting to run something through a public.js, then you need to add it like this.
https://support.wix.com/en/article/corvid-javascript-support#module-support

Thanks!