MCPcopy Index your code
hub / github.com/deployd/deployd / parsePostSignature

Function parsePostSignature

lib/internal-client.js:292–320  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

290}
291
292function parsePostSignature(args) {
293 var settings = {}
294 , i = 0;
295
296 //path
297 if (isString(args[i]) || !args[i]) {
298 settings.path = toString(args[i]);
299 i++;
300 }
301
302 // body
303 if (typeof args[i] === 'object' || !args[i]) {
304 settings.body = args[i];
305 i++;
306 }
307
308 // query - if this exists the LAST obj was query and the new one is body
309 if (typeof args[i] === 'object') {
310 settings.query = settings.body;
311 settings.body = args[i];
312 i++;
313 }
314
315 if (typeof args[i] === 'function') {
316 settings.fn = args[i];
317 }
318
319 return settings;
320}

Callers 1

createResourceClientFunction · 0.85

Calls 2

isStringFunction · 0.70
toStringFunction · 0.70

Tested by

no test coverage detected