-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A complete refactor using promises instead of thunks with other new features and API changes. #18
base: master
Are you sure you want to change the base?
Conversation
package.json
Outdated
@@ -4,7 +4,7 @@ | |||
"description": "A go style channel implementation that works nicely with co", | |||
"main": "index.js", | |||
"scripts": { | |||
"test": "mocha" | |||
"test": "babel-node --stage=0 node_modules/.bin/blue-tape src/**/*.test.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was on a kick where I really liked tape
when I wrote this, but I am good with sticking with mocha
src/select.js
Outdated
@@ -0,0 +1,30 @@ | |||
import Deferred from './deferred' | |||
|
|||
function pairs () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, shouldn't have commited this line :(, thats what I get for just commiting stuff in a half complete state.
@coderhaoxin I have had some time to work on this. I will try to push up some stuff by tomorrow morning. I am updating the dependencies, writing tests, and improving the select functionality. |
existing functionality moved to alts function
@coderhaoxin I just pushed up a bunch of stuff, there is still more to be done, but I will try to take some time over the weekend. Let me know if you have any feedback on what I am doing in this branch. |
gitignore: add lib fix entry
including adding type annotations for everything as well as some refactoring/api changes to make it fit better with static types. why typescript? i really like typescript and wanted to al least publish a typescript definition file with the package. it will be much easier to keep in sync if i write the src in typescript as well. it works out really nice for a lot of things. for example: directional channels (similar to golang) can now be acheived and checked at compile time by using specialized directional interface types `InChannel<T>` and `OutChannel<T>`. chan will continue to be just as usable from javascript. updates to the build and tests as well as removal of the old babel dependencies will come in future commits. this is a big enough chunck already.
Remaining things to do before merging:
src/
(could be based on old test that are not removed yet)prepublish
build stepasync await
instead ofco
, with maybe oneco
specific example)async.js
in the new codelib/