Galooshi / import-js

A tool to simplify importing JS modules
MIT License
525 stars 55 forks source link

Handle omitted array destructure #549

Closed trotzig closed 4 years ago

trotzig commented 4 years ago

I noticed importjs was crashing when I had this code:

const [, item] = await db.Item.findByPk(id);

This code is valid, we just need to add some special-casing to ignore the destructured omission.