0.4.4 • Published 10 years ago

digger-supplychain v0.4.4

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

digger-supplychain

Build status

Interface for digger-contracts to be sent to the server and respond with a digger-container

install

as a node module:

$ npm install digger-contracts

or in the browser using browserify

example

var supplychain = new SupplyChain();

supplychain.on('request', function(req, reply){
  req.method.should.equal('post');
  req.url.should.equal('/myapi/select');
  req.headers['x-json-selector'].tag.should.equal('hello');
  reply(null, [{
    _digger:{
      tag:'fruit',
      class:['citrus']
    }
  }]);
})

var container = supplychain.connect('/myapi');
container.diggerurl().should.equal('/myapi');

var contract = container('hello');

contract.ship(function(results){
  results.tag().should.equal('fruit');
  results.hasClass('citrus').should.equal(true);
  done();
})

licence

MIT

0.4.4

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.17

11 years ago

0.0.15

11 years ago

0.0.14

11 years ago

0.0.13

11 years ago

0.0.12

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.6

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago