Update index.js

The change witch I have suggested in the #3.
Merge pull request #9 from thiagomata/patch-1

Update index.js
Merge pull request #11 from x-cray/master

Improve API documentation
update the package on npmjs
Add new option description to README, fix code to match original style