rewrite index.js using esprima-selector and falafel-helpers