git ssb

1+

dinoworm ๐Ÿ› / vas



Tree: 7e467f6efa8f6320f4c92bbfbe6e905689e0b8eb

Files: 7e467f6efa8f6320f4c92bbfbe6e905689e0b8eb / walk.js

374 bytesRaw
1module.exports = walk
2
3function walk (services, cb, path) {
4 path = path || []
5
6 if (!Array.isArray(services)) {
7 services = [services]
8 }
9
10 services.forEach(function (service) {
11 var name = service.name
12 var servicePath = path.concat([name])
13
14 cb(service, servicePath)
15
16 if (service.services) {
17 walk(service.services, cb, servicePath)
18 }
19 })
20}
21

Built with git-ssb-web