qiao / heap.js

A binary heap implementation in CoffeeScript/JavaScript.
MIT License
125 stars 27 forks source link

allow using Heap.js in a webWorker #12

Closed valette closed 9 years ago

valette commented 9 years ago

in a worker, the global 'window' object does not exist, whereas the 'self' global object exists in both cases

qiao commented 9 years ago

Thanks for the PR.

It would be great if you could instead use the Universal Module Definition, so that this library can be used by more clients.

valette commented 9 years ago

okay, will do that. I noticed that this module actually was written using coffeescript. Does this mean I need to submit a coffeescript patch?

qiao commented 9 years ago

Yes, the file that needs to be modified is src/heap.coffee instead of lib/heap.js.

After the .coffee change is done, you can run npm install -d and make to compile the .coffee into .js(Feel free to leave this step to me if you don't feel like to configure the dependencies.)

Thanks :)