added JavaScript implementation
- Tests available both in browser and node
Merge pull request #1 from dertseha/javascript

Added JavaScript implementation