Update index.js

global leak
Merge pull request #5 from jkroso/patch-1

Remove global leak