Add scale function to index.js
I am an iziot.
Merge pull request #3 from rclosner/scale

Add scale function to index.js