🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

qi

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qi - npm Package Compare versions

Comparing version

to
0.0.4

2

package.json
{
"name":"qi",
"description":"Wait to call the final callback until all subtasks have returned.",
"version":"0.0.3",
"version":"0.0.4",
"homepage":"http://github.com/TorchlightSoftware/qi",

@@ -6,0 +6,0 @@ "repository":"git://github.com/TorchlightSoftware/qi.git",

@@ -5,3 +5,3 @@ # Qi

It is simpler and smaller than any other flow control library you will find, and the features are very powerful.
It is simpler and smaller than any other flow control library you will find, and the features are so powerful, it's probably a monad.

@@ -56,2 +56,21 @@ It supports three operations:

### Example
```coffee-script
should = require 'should'
{disperse} = require 'qi'
describe 'disperse', ->
it 'should call all callbacks', ->
yin = (input) ->
input.should.eql 1
yang = (input) ->
input.should.eql 1
taiji = disperse yin, yang
taiji 1
```
## Channel

@@ -61,2 +80,28 @@

### Example
```coffee-script
should = require 'should'
{channel} = require 'qi'
describe 'channel', ->
it 'should call multiple functions', (done) ->
task1 = (arg, next) ->
next null, arg * 4
task2 = (arg, next) ->
next null, arg + 2
final = (err, arg) ->
should.not.exist err
should.exist arg
arg.should.eql 42
done()
sequence = channel(task1, task2)
sequence 10, final
```
## LICENSE

@@ -63,0 +108,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet