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

Function formatMethod

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

Source from the content-addressed store, hash-verified

298}
299
300function formatMethod(m) {
301 const arr = [];
302 const endpoints = m.getEndpoints();
303 for (let i = 0; i < endpoints.length; i++) {
304 arr.push([
305 m.name,
306 '(',
307 m.accepts.filter(function(a) {
308 return !(a.http && typeof a.http === 'function');
309 }).map(function(a) {
310 return a.arg + ':' + a.type + (a.model ? ':' + a.model : '');
311 }).join(','),
312 ')',
313 formatReturns(m),
314 ' ',
315 endpoints[i].verb,
316 ' ',
317 endpoints[i].fullPath,
318 ].join(''));
319 }
320 return arr;
321}
322
323function findClass(name) {
324 return app.handler('rest').adapter

Calls 1

formatReturnsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…