Just to play around with some package functions I want to import it into my browser's console. I have tried this approach, but it gives a parsing error.
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://unpkg.com/libphonenumber-js@1.7.26/core/index.js';
document.head.appendChild(script);
The errror I am getting,
parsePhoneNumberFromString.js:1 Uncaught SyntaxError: Cannot use import statement outside a module
I am trying to use parsePhoneNumberFromString
function into my browser's console.