0.0.6 • Published 10 years ago

eachtick v0.0.6

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

eachtick

Non-blocking for loop styled iteration for Node.js

Installation

npm install eachtick

Usage

var eachtick = require('eachtick');

// Works with any object
// (which means arrays too)
var obj = {
  foo: 'bar',
  beep: ['boop'],
  yin: {
    yang: true
  }
};

// Provide an iterator and complete callback
// Complete callbacks are optional
eachtick(obj, function iterator(key, value){
  console.log('Key: ' + key + ' Value: ' + JSON.stringify(value));
}, function complete() {
  console.log('Iteration complete');
});

TODO

  • Add iteration completed callback for asynchronous iterators
  • Add ability to break out of iteration on errors or otherwise
  • Produce performance comparison data
  • Produce examples
  • Unit Tests
0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago