| 24459 | "node_modules/asynckit/lib/state.js"(exports2, module2) { |
| 24460 | module2.exports = state2; |
| 24461 | function state2(list, sortMethod) { |
| 24462 | var isNamedList = !Array.isArray(list), initState = { |
| 24463 | index: 0, |
| 24464 | keyedList: isNamedList || sortMethod ? Object.keys(list) : null, |
| 24465 | jobs: {}, |
| 24466 | results: isNamedList ? {} : [], |
| 24467 | size: isNamedList ? Object.keys(list).length : list.length |
| 24468 | }; |
| 24469 | if (sortMethod) { |
| 24470 | initState.keyedList.sort(isNamedList ? sortMethod : function(a4, b7) { |
| 24471 | return sortMethod(list[a4], list[b7]); |
| 24472 | }); |
| 24473 | } |
| 24474 | return initState; |
| 24475 | } |
| 24476 | } |
| 24477 | }); |
| 24478 | |