Update index.js

Lagacy -> Legacy