Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit c5e9d27

Browse files
authored
Merge pull request #350 from ipfs/fixes-async-modular
use modular async
2 parents 3fc7042 + f470f39 commit c5e9d27

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/add-to-dagnode-transform.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const async = require('async')
3+
const map = require('async/map')
44
const getDagNode = require('./get-dagnode')
55

66
// transform { Hash: '...' } objects into { path: 'string', node: DAGNode }
@@ -9,7 +9,7 @@ module.exports = function (err, res, send, done) {
99
return done(err)
1010
}
1111

12-
async.map(res, function map (entry, next) {
12+
map(res, function map (entry, next) {
1313
getDagNode(send, entry.Hash, function (err, node) {
1414
if (err) {
1515
return next(err)

src/get-dagnode.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
const DAGNode = require('ipfs-merkle-dag').DAGNode
44
const bl = require('bl')
5-
const async = require('async')
5+
const parallel = require('async/parallel')
66

77
module.exports = function (send, hash, cb) {
88
// Retrieve the object and its data in parallel, then produce a DAGNode
99
// instance using this information.
10-
async.parallel([
10+
parallel([
1111
function get (done) {
1212
send('object/get', hash, null, null, done)
1313
},

0 commit comments

Comments
 (0)