Galooshi / import-js

A tool to simplify importing JS modules
MIT License
526 stars 70 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.