In a lot of code written for node.js you can see something like
var debug = require('debug')('myserver:sub-bit');
The question I have, is how do I do this with import? The following does not seem to work.
var debug = (import d from 'debug')('myserver:sub-bit');
Nor have I found any other working short variations. The long approach, of course, does
import debugLib as 'debug';
var debug = debugLib('myserver:sub-bit');
But I just wanted an approach that didn't need to be broken out into two statements.