iterable-operator
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -27,2 +27,4 @@ export * from './is-iterable'; | ||
export * from './intersection'; | ||
export * from './flat-map-async'; | ||
export * from './flat-map'; | ||
export * from './map-async'; | ||
@@ -29,0 +31,0 @@ export * from './map'; |
@@ -43,2 +43,4 @@ "use strict"; | ||
__exportStar(require("./intersection"), exports); | ||
__exportStar(require("./flat-map-async"), exports); | ||
__exportStar(require("./flat-map"), exports); | ||
__exportStar(require("./map-async"), exports); | ||
@@ -45,0 +47,0 @@ __exportStar(require("./map"), exports); |
@@ -27,2 +27,4 @@ export * from './is-iterable'; | ||
export * from './intersection'; | ||
export * from './flat-map-async'; | ||
export * from './flat-map'; | ||
export * from './map-async'; | ||
@@ -29,0 +31,0 @@ export * from './map'; |
@@ -43,2 +43,4 @@ "use strict"; | ||
__exportStar(require("./intersection"), exports); | ||
__exportStar(require("./flat-map-async"), exports); | ||
__exportStar(require("./flat-map"), exports); | ||
__exportStar(require("./map-async"), exports); | ||
@@ -45,0 +47,0 @@ __exportStar(require("./map"), exports); |
{ | ||
"name": "iterable-operator", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Utilities for JavaScript Iterable and AsyncIterable", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -270,2 +270,18 @@ # iterable-operator | ||
### flatMap, flatMapAsync | ||
```ts | ||
function flatMap<T, U>( | ||
iterable: Iterable<T> | ||
, fn: (element: T, index: number) => Iterable<U> | ||
): IterableIterator<U> | ||
function flatMapAsync<T, U>( | ||
iterable: Iterable<T> | AsyncIterable<T> | ||
, fn: (element: T, index: number) => Iterable<U> | AsyncIterable<U> | ||
): AsyncIterableIterator<U> | ||
``` | ||
```ts | ||
map([1, 2, 3], x => [x, x * 2]) // [1, 2, 2, 4, 3, 6] | ||
``` | ||
### repeat, repeatAsync | ||
@@ -272,0 +288,0 @@ ```ts |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
367528
519
5260
734