How would I translate this, for the ES6 import style

I would like to do it

var debug = require('debug')('myapp');

... in ES6 without creating an additional variable. It can be done?

+4
source share
1 answer
import Debug from 'debug';

const debug = Debug('myapp');

(as lemieuxster said ... referring to the fact that he is still listed in unanswered questions)

+7
source

All Articles