However, the default export is the request object. So using es6 import syntax, following the example gives a popsicle.request is not a function error. Instead, one must do:
import { request, plugins } from 'popsicle'
request(...).use(plugins.parse('json')
not so bad in this tiny example, but if you're using lots of popsicle functions you end uup with a lot of named imports that pollute the namespace. Why not export a popsicle object, either named or by default, so that es6 users one can use syntax consistent with the examples in documentation?
In documentation you use commonjs style require() to import the popsicle module, and then use it as follows:
However, the default export is the
request
object. So using es6 import syntax, following the example gives apopsicle.request is not a function
error. Instead, one must do:not so bad in this tiny example, but if you're using lots of popsicle functions you end uup with a lot of named imports that pollute the namespace. Why not export a
popsicle
object, either named or by default, so that es6 users one can use syntax consistent with the examples in documentation?