MCPcopy Create free account
hub / github.com/PaperElectron/Sundry / backendlist

Function backendlist

cli/interactive.js:229–254  ·  view source on GitHub ↗
(title, host, arrayData)

Source from the content-addressed store, hash-verified

227 * Outputters
228 */
229function backendlist(title, host, arrayData) {
230 var metaOnly = [];
231 var routesOnly = _.filter(arrayData, function(i){
232 var id = i.split(':')
233 if(id[0] === '***data'){
234 metaOnly.push(id[1]);
235 return false
236 }
237 return true
238 })
239 /*
240 * Output
241 */
242 console.log(separate('yellow', title, true));
243 console.log(chalk.green.bold('- ' + host))
244 console.log(chalk.green(' - Routes'))
245 _.each(routesOnly, function(d){
246 console.log(chalk.white(' - ' + d))
247 })
248 console.log(chalk.green(' - Metadata'))
249 _.each(metaOnly, function(m){
250 var m = m.split(',');
251 console.log(chalk.white(' - ' + m[0] + ' -- ' + m[1]));
252 })
253 console.log(separate('yellow', true));
254}
255
256function deleteBackend(arrData){
257 var data = _.chain(arrData)

Callers

nothing calls this directly

Calls 1

separateFunction · 0.85

Tested by

no test coverage detected