In example, you would have
var browserSync = require('browser-sync').create();
When trying to make this an import, is there a reliable way to append the .create
method to the import or would this have to be something like browserSync.create().init({...})
?
Another example would be
var debug = require('debug')('http')
which we can rewrite as
var debug = require('debug')
debug('test')('http');
Can this be rewritten with import
?