Visit nodes in the tree asynchronously and sequentially. Supports promises.
Visit nodes in the tree asynchronously and sequentially.
Like Tree Visitor, but actions accept an additional callback function that should be called when it's done processing the node.
var VisitorAsync = require'tree-visitor-async';var nodes =type: 'import' value: 'path/to/file1'type: 'import' value: 'path/to/file2';var visitorAsync =fsreadFileimportNodevalue 'utf8' done;;visitorAsyncvisitnodesif err throw err;;
visit() also accepts a callback function that will be called when all node in the tree has been processed.