0.1.2 • Published 7 years ago

jchecks v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

jchecks

NPM version Build Status Coverage Status

checklist

使用方法

示例

  var flag = 0;
  var flagTimer = setInterval(function () {
      flag++;
  }, 1000);
  var checklist = new jchecks.Checklist({
    items: [{
      checker: function () {
        console.log('checker 1')
        return flag > 0
      },
      processor: function () {
        console.log('processor 1')
        return null
      },
      timeout: 5000,
    }, {
      checker: function () {
        console.log('checker 2')
        return flag > 3
      },
      processor: function () {
        console.log('processor 2')
        return null
      },
    }]
  });

  checklist.on('error', function (error) {
	console.error(error);
  }).on('stop', function () {
	console.info('stop');
  });

License

MIT © zswang

0.1.2

7 years ago

0.1.0

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.9

7 years ago

0.0.1

7 years ago