0.1.0 • Published 7 years ago

iterate-fun v0.1.0

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

iterate-fun

A function toolbelt to work with iterables

background details relevant to understanding what this module does

Usage

description of the example

const iterateFun = require('iterate-fun');

console.log({iterateFun});

This will output

Travis Build Status NPM downloads

API

iterateFunction

Return an iterable that continously call fn argument, iterating over the results.

Parameters

  • fn Function the function that returns result iterable items.

Examples

const arr = [42, 43, 44];
const result = iterateFunction(() => {
	if (arr.length === 0) {
		return Done;
	}
	return arr.shift() + 1;
});
// results === [43, 44, 45]

Returns any A new iterable that iterate over fn results.

Install

With npm installed, run

$ npm install iterate-fun

See Also

License

MIT

0.1.0

7 years ago

0.0.1

7 years ago