Import or Require Qs.stringify inside Javascript script

Asked

Viewed 105 times

0

It is possible to apply a import or a require in querystring.stringify to use it inside a pure javascript? What is the ideal way for this implementation below?

Ex:

<script>
    var qs = require('qs');

    let data = { email: email, password: password };
    data = qs.stringify(data);
</script>

Or

<script>
    import qs from 'qs';

    let data = { email: email, password: password };
    data = qs.stringify(data);
</script>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.