1.0.12 • Published 5 years ago

swint-task v1.0.12

Weekly downloads
77
License
MIT
Repository
github
Last release
5 years ago

swint-task

Greenkeeper badge Batch task manager for Swint. Proceeds the tasks one-by-one, respectively.

Warning: This is not the final draft yet, so do not use this until its official version is launched

Installation

$ npm install --save swint-task

Usage

var tasks = [
		{
			func: function(option, callback) {
				// task 1
				callback(null, true);
			}
		},
		{
			func: function(option, callback) {
				// task 2
				callback(null, option.value); // option.value === 42
			},
			option: {
				value: 42
			}
		},
		{
			func: function(option, callback) {
				setTimeout(function() {
					// task 3
					callback(null, true);
				}, 10);
			}
		}
	];

task(tasks, function(err, res) {
	// task 1, 2, 3 is executed, respectively
});
1.0.12

5 years ago

1.0.11

6 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago