MCPcopy
hub / github.com/strongloop/loopback / formatReturns

Function formatReturns

test/remoting.integration.js:285–298  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

283});
284
285function formatReturns(m) {
286 const returns = m.returns;
287 if (!returns || returns.length === 0) {
288 return '';
289 }
290 let type = returns[0].type;
291
292 // handle anonymous type definitions, e.g
293 // { arg: 'info', type: { count: 'number' } }
294 if (typeof type === 'object' && !Array.isArray(type))
295 type = 'object';
296
297 return type ? ':' + type : '';
298}
299
300function formatMethod(m) {
301 const arr = [];

Callers 1

formatMethodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…