Skip to content

Commit

Permalink
Remove iterables from README and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jul 7, 2019
1 parent 40022ef commit 8af88ec
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ Retrieves every possible combination between several arrays
([cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)):

- [fastest](#benchmarks) available library in JavaScript
- works with any
[iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables):
arrays,
[generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator),
strings, maps, sets, etc.

# Example

Expand All @@ -34,14 +29,6 @@ const fastCartesian = require('fast-cartesian')
// [ '04', 'Feb', '2019' ],
// ]
console.log(fastCartesian(['01', '04'], ['Jan', 'Feb'], ['1980', '2019']))

// Works with any iterable: arrays, generators, strings, maps, sets, etc.
const generator = function*() {
yield 'Jan'
yield 'Feb'
}

console.log(fastCartesian(['01', '04'], generator(), ['1980', '2019']))
```

# Demo
Expand Down Expand Up @@ -70,9 +57,7 @@ const combinations = fastCartesian(...inputs)

## fastCartesian(...inputs)

`inputs`:
[`iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables)
(one or several)<br> _Return value_: `array[]`
`inputs`: `Array` (one or several)<br> _Return value_: `array[]`

Returns a two-dimensional `array` where each row is a combination of `inputs`.

Expand Down
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ They can also be run directly
## Examples

- [Main usage](main.js)
- [Iterables](iterable.js)
32 changes: 0 additions & 32 deletions examples/iterable.js

This file was deleted.

0 comments on commit 8af88ec

Please sign in to comment.