iteragain
Advanced tools
Comparing version 3.13.4 to 3.14.0
@@ -59,3 +59,4 @@ import chunks from './chunks'; | ||
import length from './length'; | ||
export { chunks, combinations, compress, concat, consume, count, cycle, distribute, divide, dropWhile, enumerate, every, filter, filterMap, find, findIndex, flatten, forEach, includes, isIterable, isIterator, iter, length, map, max, min, minmax, nth, pairwise, partition, permutations, pluck, product, quantify, range, reduce, repeat, resume, reverse, roundrobin, seekable, shuffle, slice, some, sort, spy, take, takeWhile, tap, tee, toArray, toIterator, triplewise, unique, unzip, windows, zip, zipLongest, }; | ||
import flatMap from './flatMap'; | ||
export { chunks, combinations, compress, concat, consume, count, cycle, distribute, divide, dropWhile, enumerate, every, filter, filterMap, find, findIndex, flatMap, flatten, forEach, includes, isIterable, isIterator, iter, length, map, max, min, minmax, nth, pairwise, partition, permutations, pluck, product, quantify, range, reduce, repeat, resume, reverse, roundrobin, seekable, shuffle, slice, some, sort, spy, take, takeWhile, tap, tee, toArray, toIterator, triplewise, unique, unzip, windows, zip, zipLongest, }; | ||
declare const _default: { | ||
@@ -78,2 +79,3 @@ chunks: typeof chunks; | ||
findIndex: typeof findIndex; | ||
flatMap: typeof flatMap; | ||
flatten: typeof flatten; | ||
@@ -80,0 +82,0 @@ forEach: typeof forEach; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tee = exports.tap = exports.takeWhile = exports.take = exports.spy = exports.sort = exports.some = exports.slice = exports.shuffle = exports.seekable = exports.roundrobin = exports.reverse = exports.resume = exports.repeat = exports.reduce = exports.range = exports.quantify = exports.product = exports.pluck = exports.permutations = exports.partition = exports.pairwise = exports.nth = exports.minmax = exports.min = exports.max = exports.map = exports.length = exports.iter = exports.isIterator = exports.isIterable = exports.includes = exports.forEach = exports.flatten = exports.findIndex = exports.find = exports.filterMap = exports.filter = exports.every = exports.enumerate = exports.dropWhile = exports.divide = exports.distribute = exports.cycle = exports.count = exports.consume = exports.concat = exports.compress = exports.combinations = exports.chunks = void 0; | ||
exports.zipLongest = exports.zip = exports.windows = exports.unzip = exports.unique = exports.triplewise = exports.toIterator = exports.toArray = void 0; | ||
exports.tap = exports.takeWhile = exports.take = exports.spy = exports.sort = exports.some = exports.slice = exports.shuffle = exports.seekable = exports.roundrobin = exports.reverse = exports.resume = exports.repeat = exports.reduce = exports.range = exports.quantify = exports.product = exports.pluck = exports.permutations = exports.partition = exports.pairwise = exports.nth = exports.minmax = exports.min = exports.max = exports.map = exports.length = exports.iter = exports.isIterator = exports.isIterable = exports.includes = exports.forEach = exports.flatten = exports.flatMap = exports.findIndex = exports.find = exports.filterMap = exports.filter = exports.every = exports.enumerate = exports.dropWhile = exports.divide = exports.distribute = exports.cycle = exports.count = exports.consume = exports.concat = exports.compress = exports.combinations = exports.chunks = void 0; | ||
exports.zipLongest = exports.zip = exports.windows = exports.unzip = exports.unique = exports.triplewise = exports.toIterator = exports.toArray = exports.tee = void 0; | ||
const chunks_1 = require("./chunks"); | ||
@@ -121,2 +121,4 @@ exports.chunks = chunks_1.default; | ||
exports.length = length_1.default; | ||
const flatMap_1 = require("./flatMap"); | ||
exports.flatMap = flatMap_1.default; | ||
exports.default = { | ||
@@ -139,2 +141,3 @@ chunks: chunks_1.default, | ||
findIndex: findIndex_1.default, | ||
flatMap: flatMap_1.default, | ||
flatten: flatten_1.default, | ||
@@ -141,0 +144,0 @@ forEach: forEach_1.default, |
@@ -258,2 +258,7 @@ import { IteratorOrIterable, FlattenDeep, FlattenDepth1, FlattenDepth2, FlattenDepth3, FlattenDepth4, FlattenDepth5, Tuple, Predicate, Iteratee, Callback, StrictPredicate } from './types'; | ||
findIndex(predicate: Predicate<T>): number; | ||
/** | ||
* Maps this iterator to a new value `R` and flattens any resulting iterables or iterators by a depth of 1. | ||
* Behaves the same as `Array.prototype.flatMap`. | ||
*/ | ||
flatMap<R>(iteratee: Iteratee<T, R | IteratorOrIterable<R>>): this; | ||
/** Returns true if `value` strictly equals some value in this iterator. */ | ||
@@ -260,0 +265,0 @@ includes(value: T): boolean; |
@@ -29,2 +29,3 @@ "use strict"; | ||
const count_1 = require("../count"); | ||
const FlatMapIterator_1 = require("./FlatMapIterator"); | ||
/** | ||
@@ -433,2 +434,10 @@ * Extends and implements the IterableIterator interface. Methods marked with the `@lazy` prefix are chainable methods | ||
} | ||
/** | ||
* Maps this iterator to a new value `R` and flattens any resulting iterables or iterators by a depth of 1. | ||
* Behaves the same as `Array.prototype.flatMap`. | ||
*/ | ||
flatMap(iteratee) { | ||
this.iterator = new FlatMapIterator_1.default(this.iterator, iteratee); | ||
return this; | ||
} | ||
/** Returns true if `value` strictly equals some value in this iterator. */ | ||
@@ -435,0 +444,0 @@ includes(value) { |
{ | ||
"name": "iteragain", | ||
"version": "3.13.4", | ||
"version": "3.14.0", | ||
"description": "Javascript Iterable/Iterator/Generator-function utilities.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
183143
190
4001