1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _eachOfLimit = require('./internal/eachOfLimit.js');
|
8 |
|
9 | var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
|
10 |
|
11 | var _awaitify = require('./internal/awaitify.js');
|
12 |
|
13 | var _awaitify2 = _interopRequireDefault(_awaitify);
|
14 |
|
15 | var _once = require('./internal/once.js');
|
16 |
|
17 | var _once2 = _interopRequireDefault(_once);
|
18 |
|
19 | var _wrapAsync = require('./internal/wrapAsync.js');
|
20 |
|
21 | var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
|
22 |
|
23 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | function mapValuesLimit(obj, limit, iteratee, callback) {
|
48 | callback = (0, _once2.default)(callback);
|
49 | var newObj = {};
|
50 | var _iteratee = (0, _wrapAsync2.default)(iteratee);
|
51 | return (0, _eachOfLimit2.default)(limit)(obj, (val, key, next) => {
|
52 | _iteratee(val, key, (err, result) => {
|
53 | if (err) return next(err);
|
54 | newObj[key] = result;
|
55 | next(err);
|
56 | });
|
57 | }, err => callback(err, newObj));
|
58 | }
|
59 |
|
60 | exports.default = (0, _awaitify2.default)(mapValuesLimit, 4);
|
61 | module.exports = exports.default; |
\ | No newline at end of file |