Import or Require qs.stringify inside JavaScript script

0

Is it possible to apply a import or require in querystring.stringify to use it inside a pure javascript? What is the ideal way to implement this?

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>
    
asked by anonymous 18.09.2018 / 02:02

0 answers