Update index.js

empty array ignore extension for best performance