ES6 named import for `delete` under Standard
jda0 opened this issue · comments
James Daly commented
It appears impossible to require the delete
method without upsetting Standard JS, either due to conflicting with a reserved word (const { delete } = require('microrouter')
) or not defining the function (require('microrouter')
). Any suggestions?
Pedro Nauck commented
Hi @jda0, you can rename the imported method like that:
const { router, delete: del } = require('microrouter');
Lucas Bento commented
WebStorm also highlights this differently because of the name, perhaps it would be better to export it as del
as well.
Pedro Nauck commented
That's a good point @lucasbento, I'll make this change