Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This is the product of my insomnia.
CoffeeScript JavaScript
Branch: master

README.md

Itertools

This is an initial attempt to port some of Python's itertools functions to node.

Quick example:

var itertools = require("itertools");
var fruitBaskets = itertools.permutationsSync(["Apple", "Orange", "Banana"], 2);
// fruitBaskets = [['Apple', 'Orange'], ['Apple', 'Banana'], ['Orange', 'Apple'], ['Orange', 'Banana'], ['Banana', 'Apple'], ['Banana', 'Orange']]

Install

$ npm install itertools

OR

$ git clone git://github.com/thegoleffect/node-itertools.git

THEN

var itertools = require('itertools');

API

Since this is a new port, these are the only functions completed thus far:

itertools.permutationsSync(iterable[, r])

    Returns list of r length permutations of elements in the iterable.

Something went wrong with that request. Please try again.