added js code
fixed bug in hasNext()
Now ignoring stream objects with undefined bounds