bluefeather
Advanced tools
Comparing version 2.3.2 to 2.4.0
@@ -16,2 +16,11 @@ 'use strict'; | ||
var _map = require('./map'); | ||
Object.defineProperty(exports, 'map', { | ||
enumerable: true, | ||
get: function () { | ||
return _interopRequireDefault(_map).default; | ||
} | ||
}); | ||
var _mapSeries = require('./mapSeries'); | ||
@@ -18,0 +27,0 @@ |
@@ -64,3 +64,6 @@ { | ||
}, | ||
"version": "2.3.2" | ||
"version": "2.4.0", | ||
"dependencies": { | ||
"bluebird": "^3.5.0" | ||
} | ||
} |
@@ -12,2 +12,3 @@ # Bluefeather | ||
* [`delay`](#delay) | ||
* [`map`](#map) | ||
* [`mapSeries`](#mapseries) | ||
@@ -31,2 +32,21 @@ * [`promisify`](#promisify) | ||
### `map` | ||
> For the record, this function is just a thin-wrapper around [`Bluebird#map`](http://bluebirdjs.com/docs/api/promise.map.html). | ||
This method is identical to [`Bluebird#map`](http://bluebirdjs.com/docs/api/promise.map.html) except that the `concurrency` setting can be overridden using `BLUEFEATHER_MAX_CONCURRENCY` environment variable. Controlling max concurrency using environment variables enables debugging of the codebase without refactoring the code. | ||
```js | ||
type CallbackType = (currentValue: any, index: any, values: Iterable<any>) => any; | ||
type MapConfigurationType = {| | ||
+concurrency: number | ||
|}; | ||
type MapType = (values: Array<any>, mapper: CallbackType, configuration: MapConfigurationType) => Promise<Array<any>>; | ||
const map: MapType; | ||
``` | ||
### `mapSeries` | ||
@@ -69,6 +89,6 @@ | ||
```js | ||
type SuppressType = <T: *>( | ||
type SuppressType = <T: Promise<*>>( | ||
ErrorConstructor: Class<Error>, | ||
promise: Promise<T> | ||
) => Promise<T | void>; | ||
promise: T | ||
) => T | Promise<void>; | ||
@@ -75,0 +95,0 @@ /** |
// @flow | ||
export {default as delay} from './delay'; | ||
export {default as map} from './map'; | ||
export {default as mapSeries} from './mapSeries'; | ||
export {default as promisify} from './promisify'; | ||
export {default as suppress} from './suppress'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
23503
27
254
98
1
4
+ Addedbluebird@^3.5.0
+ Addedbluebird@3.7.2(transitive)